Version
class Version implements ObjectInterface (View source)
Traits
Constants
| UT_REPLACE_FILE | 
                     
  | 
            
| UT_TITLE | 
                     
  | 
            
| UT_DESCRIPTION | 
                     
  | 
            
| UT_TAGS | 
                     
  | 
            
| UT_EXTENDED_ATTRIBUTE | 
                     
  | 
            
| UT_CONTENTS | 
                     
  | 
            
| UT_RENAME | 
                     
  | 
            
Properties
| protected File | $file | /* @ORM\Id  | 
                |
| protected | $fvID | ||
| protected | $fvFilename | ||
| protected | $fvPrefix | ||
| protected | $fvDateAdded | ||
| protected | $fvActivateDateTime | ||
| protected | $fvIsApproved | ||
| protected | $fvAuthorUID | ||
| protected | $fvSize | ||
| protected | $fvApproverUID | ||
| protected | $fvTitle | ||
| protected | $fvDescription | ||
| protected | $fvExtension | ||
| protected | $fvType | ||
| protected | $fvTags | ||
| protected | $fvHasListingThumbnail | ||
| protected | $fvHasDetailThumbnail | ||
| private | $imagineImage | 
Methods
No description
Necessary because getAttribute() returns the Value Value object, and this returns the File Attribute Value object.
Sets the attribute of a user info object to the specified value, and saves it in the database.
No description
Clean the tags (removing whitespace).
Set the filename.
Path prefix for a file.
If the current version is approved.
Get the tags as an array of strings.
Get the tags for a file.
File ID.
File Version ID.
Removes a version of a file. Note, does NOT remove the file because we don't know where the file might elsewhere be used/referenced.
Copy the thumbnails from the original to the copy when duplicating a file.
Move the thumbnails for the current file version to a new storage location.
Returns an abstracted File object for the resource. NOT a concrete5 file object.
Get the mime type of the file if known.
Get the formatted filesize of a file e.g. 123KB.
File size of the file.
The author of the file (or Unknown).
Return the uID for the author of the file.
Gets the date a file version was added.
Get the file extension for a file.
Set the ID for the file version.
Takes the current value of the file version and makes a new one with the same values.
Deny a file version update.
Save changes to a file.
Get the file type name.
Get the file type display name (localized).
No description
Returns an array containing human-readable descriptions of everything that happened in this version.
Update the Title for a file.
Duplicate a file (adds a new version).
Log updates to files.
Update the tags for a file.
Update the description of a file.
Rename a file.
Update the contents of a file.
Update the filename and prefix of a file.
Approve the change to a file version.
Return the contents of a file.
Returns a url that can be used to download a file, will force the download of all file types, even if your browser can display them.
Forces the download of a file.
Return the filename for a file if it exists.
Return the relative path for a file (may not exist).
Get an array of thumbnails.
No description
Unload the loaded image.
Rescan the thumbnails for a file (images only).
Return the thumbnail for an image or a generic type icon for a file.
When given a thumbnail type versin object and a full path to a file on the server the file is imported into the system as is as the thumbnail.
Returns a full URL to the file on disk.
Returns a URL that can be used to download the file. This passes through the download_file single page.
No description
Responsible for taking a particular version of a file and rescanning all its attributes This will run any type-based import routines, and store those attributes, generate thumbnails, etc.
Title for the file if one exists.
Return a representation of the current FileVersion object as something easily serializable.
Checks current viewers for this type and returns true if there is a viewer for this type, false if not.
Checks current viewers for this type and returns true if there is a viewer for this type, false if not.
Get the localized name of the generic category type.
Returns the description for the file if there is one.
Return the thumbnail for an image or a generic type icon for a file.
Details
        
                            CategoryInterface
    getObjectAttributeCategory()
        
    
    No description
        
                            AttributeValueInterface|null
    getAttributeValueObject(AttributeKeyInterface|string $ak, bool $createIfNotExists = false)
        
    
    Necessary because getAttribute() returns the Value Value object, and this returns the File Attribute Value object.
        
                            
    getAttribute($ak, $mode = false)
        
    
    No description
        
                            Value
    getAttributeValue($ak)
        
    
    No description
        
                            
    clearAttribute($ak)
        
    
    No description
        
                            Value
    setAttribute($ak, mixed $value)
        
    
    Sets the attribute of a user info object to the specified value, and saves it in the database.
        
                            
    __construct()
        
    
    No description
        
                static            Version
    add(File $file, string $filename, string $prefix, array $data = [])
        
    
    Add a new file version.
        
                static            string
    cleanTags($tagsStr)
        
    
    Clean the tags (removing whitespace).
        
                            
    setFilename(string $filename)
        
    
    Set the filename.
        
                            string
    getPrefix()
        
    
    Path prefix for a file.
        
                            bool
    isApproved()
        
    
    If the current version is approved.
        
                            string[]
    getTagsList()
        
    
    Get the tags as an array of strings.
        
                            null|string
    getTags()
        
    
    Get the tags for a file.
        
                            File
    getFile()
        
    
    returns the File object associated with this FileVersion object.
        
                            
    setFile(File $file)
        
    
    Set the current file.
        
                            int
    getFileID()
        
    
    File ID.
        
                            int
    getFileVersionID()
        
    
    File Version ID.
        
                            
    delete(bool $deleteFilesAndThumbnails = false)
        
    
    Removes a version of a file. Note, does NOT remove the file because we don't know where the file might elsewhere be used/referenced.
        
                            
    deleteThumbnail(string|Version $type)
        
    
    Deletes the thumbnail for the particular thumbnail type.
        
                            
    duplicateUnderlyingThumbnailFiles(string $type, Version $source)
        
    
    Copy the thumbnails from the original to the copy when duplicating a file.
        
                            
    updateThumbnailStorageLocation(string $type, StorageLocation $location)
        
    
    Move the thumbnails for the current file version to a new storage location.
        
                            File
    getFileResource()
        
    
    Returns an abstracted File object for the resource. NOT a concrete5 file object.
        
                            string
    getMimeType()
        
    
    Get the mime type of the file if known.
        
                            mixed|string
    getSize()
        
    
    Get the formatted filesize of a file e.g. 123KB.
        
                            int
    getFullSize()
        
    
    File size of the file.
        
                            string
    getAuthorName()
        
    
    The author of the file (or Unknown).
        
                            int
    getAuthorUserID()
        
    
    Return the uID for the author of the file.
        
                            string
    getDateAdded()
        
    
    Gets the date a file version was added.
        
                            null|string
    getExtension()
        
    
    Get the file extension for a file.
        
                            
    setFileVersionID(int $fvID)
        
    
    Set the ID for the file version.
        
                            Version
    duplicate()
        
    
    Takes the current value of the file version and makes a new one with the same values.
        
                            
    deny()
        
    
    Deny a file version update.
        
                    protected        
    save(bool $flush = true)
        
    
    Save changes to a file.
        
                            string
    getType()
        
    
    Get the file type name.
        
                            string
    getDisplayType()
        
    
    Get the file type display name (localized).
        
                            Type
    getTypeObject()
        
    
    No description
        
                            string[]
    getVersionLogComments()
        
    
    Returns an array containing human-readable descriptions of everything that happened in this version.
        
                            
    updateTitle(string $title)
        
    
    Update the Title for a file.
        
                            
    duplicateUnderlyingFile()
        
    
    Duplicate a file (adds a new version).
        
                            
    logVersionUpdate(int $updateTypeID, int $updateTypeAttributeID = 0)
        
    
    Log updates to files.
        
                            
    updateTags(string $tags)
        
    
    Update the tags for a file.
        
                            
    updateDescription(string $descr)
        
    
    Update the description of a file.
        
                            
    rename(string $filename)
        
    
    Rename a file.
        
                            
    updateContents(string $contents)
        
    
    Update the contents of a file.
        
                            
    updateFile(string $filename, string $prefix)
        
    
    Update the filename and prefix of a file.
        
                            
    approve()
        
    
    Approve the change to a file version.
        
                            string
    getFileContents()
        
    
    Return the contents of a file.
        
                            string
    getForceDownloadURL()
        
    
    Returns a url that can be used to download a file, will force the download of all file types, even if your browser can display them.
        
                            
    forceDownload()
        
    
    Forces the download of a file.
        
                            null|string
    getFileName()
        
    
    Return the filename for a file if it exists.
        
                            string
    getRelativePath()
        
    
    Return the relative path for a file (may not exist).
        
                            Thumbnail[]
    getThumbnails()
        
    
    Get an array of thumbnails.
        
                            bool|Image
    getImagineImage()
        
    
    No description
        
                            
    releaseImagineImage()
        
    
    Unload the loaded image.
        
                            bool
    rescanThumbnails()
        
    
    Rescan the thumbnails for a file (images only).
        
                            mixed
    hasThumbnail($level)
        deprecated
    
    deprecated
No description
        
                            string
    getDetailThumbnailImage()
        
    
    Return the thumbnail for an image or a generic type icon for a file.
        
                            null|string
    getThumbnailURL(string|Version $type)
        
    
    Resolve a path using the default core path resolver.
Avoid using this method when you have access to your a resolver instance.
        
                            
    importThumbnail(Version $version, string $path)
        
    
    When given a thumbnail type versin object and a full path to a file on the server the file is imported into the system as is as the thumbnail.
        
                            null|string
    getURL()
        
    
    Returns a full URL to the file on disk.
        
                            string
    getDownloadURL()
        
    
    Returns a URL that can be used to download the file. This passes through the download_file single page.
        
                            mixed
    getAttributes()
        
    
    No description
        
                            null|int
    refreshAttributes(bool $rescanThumbnails = true)
        
    
    Responsible for taking a particular version of a file and rescanning all its attributes This will run any type-based import routines, and store those attributes, generate thumbnails, etc.
..
        
                            null|string
    getTitle()
        
    
    Title for the file if one exists.
        
                            string
    getJSONObject()
        
    
    Return a representation of the current FileVersion object as something easily serializable.
        
                            bool
    canView()
        
    
    Checks current viewers for this type and returns true if there is a viewer for this type, false if not.
        
                            bool
    canEdit()
        
    
    Checks current viewers for this type and returns true if there is a viewer for this type, false if not.
        
                            string
    getGenericTypeText()
        
    
    Get the localized name of the generic category type.
        
                            null|string
    getDescription()
        
    
    Returns the description for the file if there is one.
        
                            string
    getListingThumbnailImage()
        
    
    Return the thumbnail for an image or a generic type icon for a file.
        
                            
    generateThumbnail(Version $type)
        
    
    Generate a thumbnail given a type