PHP Класс Pimcore\Model\Asset

Наследование: extends Pimcore\Model\Element\AbstractElement
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$childs array Contains the child elements
$creationDate integer Timestamp of creation
$customSettings array .. of the asset, ...
$dependencies Dependency Dependencies of this asset
$filename string Name of the file
$hasChilds boolean Indicator if there are childs
$hasMetaData boolean
$hasSiblings boolean Indicator if document has siblings or not
$id integer Unique ID
$locked string enum('self','propagate') nullable
$metadata array
$mimetype string Mime-Type of the file
$modificationDate integer Timestamp of modification
$parent Asset
$parentId integer ID of the parent asset
$path string Path of the file, without the filename, only the full path of the parent asset
$properties array List of properties
$scheduledTasks array Contains all scheduled tasks
$siblings array Contains a list of sibling documents
$stream resource
$type string Type
$types array possible types of an asset
$userModification integer ID of the user who make the latest changes
$userOwner integer ID of the owner user
$versions array List of versions

Защищенные свойства (Protected)

Свойство Тип Описание
$_dataChanged boolean Indicator if data has changed

Открытые методы

Метод Описание
__destruct ( )
__sleep ( )
__wakeup ( )
addMetadata ( string $name, string $type, null $data = null, null $language = null )
clearDependentCache ( array $additionalTags = [] )
correctPath ( )
create ( integer $parentId, array $data = [], $save = true ) : Asset Helper to quickly create a new asset
delete ( )
getById ( integer $id ) : Asset | Archive | Audio | Document | Folder | Image | Text | Unknown | Video Static helper to get an asset by the passed ID
getByPath ( string $path ) : Asset | Archive | Audio | Document | Folder | Image | Text | Unknown | Video Static helper to get an asset by the passed path
getChecksum ( string $type = "md5" ) : null | string
getChildren ( ) : array
getCreationDate ( ) : integer
getCustomSetting ( $key ) : null
getCustomSettings ( ) : array
getData ( ) : mixed
getDataChanged ( ) : boolean
getDependencies ( ) : Dependency
getFileSize ( string $format = 'noformatting', $precision = 2 ) : string Get filesize
getFileSystemPath ( ) : string Get full path to the asset on the filesystem
getFilename ( ) : string
getFullPath ( ) : string Returns the full path of the document including the filename
getHasMetaData ( ) : boolean
getId ( ) : integer
getImageThumbnailSavePath ( ) : string
getKey ( ) : string Alias for getFilename()
getList ( array $config = [] ) : mixed
getLocked ( ) : string Returns true if the element is locked
getMetadata ( $name = null, $language = null ) : array
getMimetype ( ) : string
getModificationDate ( ) : integer
getParent ( ) : Asset
getParentId ( ) : integer
getPath ( ) : string
getProperties ( ) : Property[]
getRealFullPath ( ) : string
getRealPath ( ) : string
getScheduledTasks ( ) : array
getSiblings ( ) : array Get a list of the sibling assets
getStream ( ) : resource
getTemporaryFile ( ) : string returns the path to a temp file
getTotalCount ( array $config = [] ) : total
getType ( ) : string
getTypeFromMimeMapping ( $mimeType, $filename ) : integer | string returns the asset type of a filename and mimetype
getTypes ( ) : array
getUserModification ( ) : integer
getUserOwner ( ) : integer
getVersions ( ) : array
getVideoThumbnailSavePath ( ) : string
hasChildren ( ) : boolean
hasSiblings ( ) : boolean Returns true if the asset has at least one sibling
removeCustomSetting ( $key )
removeInheritedProperties ( )
renewInheritedProperties ( )
save ( )
saveScheduledTasks ( )
saveVersion ( boolean $setModificationDate = true, boolean $callPluginHook = true ) : null | Version
setCreationDate ( integer $creationDate )
setCustomSetting ( string $key, mixed $value )
setCustomSettings ( array $customSettings )
setData ( mixed $data )
setDataChanged ( boolean $changed = true )
setFilename ( string $filename )
setHasMetaData ( boolean $hasMetaData )
setId ( integer $id )
setLocked ( $locked )
setMetadata ( array $metadata )
setMimetype ( string $mimetype )
setModificationDate ( integer $modificationDate )
setParent ( Asset $parent )
setParentId ( integer $parentId )
setPath ( string $path )
setProperties ( array $properties )
setProperty ( $name, $type, $data, boolean $inherited = false, boolean $inheritable = false )
setScheduledTasks ( $scheduledTasks )
setStream ( $stream )
setType ( string $type )
setUserModification ( integer $userModification )
setUserOwner ( integer $userOwner )
setVersions ( array $versions )

Защищенные методы

Метод Описание
closeStream ( )
deletePhysicalFile ( ) Deletes file from filesystem
update ( )

Описание методов

__destruct() публичный Метод

public __destruct ( )

__sleep() публичный Метод

public __sleep ( )

__wakeup() публичный Метод

public __wakeup ( )

addMetadata() публичный Метод

public addMetadata ( string $name, string $type, null $data = null, null $language = null )
$name string
$type string can be "folder", "image", "input", "audio", "video", "document", "archive" or "unknown"
$data null
$language null

clearDependentCache() публичный Метод

public clearDependentCache ( array $additionalTags = [] )
$additionalTags array

closeStream() защищенный Метод

protected closeStream ( )

correctPath() публичный Метод

public correctPath ( )

create() публичный статический Метод

Helper to quickly create a new asset
public static create ( integer $parentId, array $data = [], $save = true ) : Asset
$parentId integer
$data array
Результат Asset

delete() публичный Метод

public delete ( )

deletePhysicalFile() защищенный Метод

Deletes file from filesystem
protected deletePhysicalFile ( )

getById() публичный статический Метод

Static helper to get an asset by the passed ID
public static getById ( integer $id ) : Asset | Archive | Audio | Document | Folder | Image | Text | Unknown | Video
$id integer
Результат Asset | Archive | Audio | Document | Folder | Image | Text | Unknown | Video

getByPath() публичный статический Метод

Static helper to get an asset by the passed path
public static getByPath ( string $path ) : Asset | Archive | Audio | Document | Folder | Image | Text | Unknown | Video
$path string
Результат Asset | Archive | Audio | Document | Folder | Image | Text | Unknown | Video

getChecksum() публичный Метод

public getChecksum ( string $type = "md5" ) : null | string
$type string
Результат null | string

getChildren() публичный Метод

public getChildren ( ) : array
Результат array

getCreationDate() публичный Метод

public getCreationDate ( ) : integer
Результат integer

getCustomSetting() публичный Метод

public getCustomSetting ( $key ) : null
$key
Результат null

getCustomSettings() публичный Метод

public getCustomSettings ( ) : array
Результат array

getData() публичный Метод

public getData ( ) : mixed
Результат mixed

getDataChanged() публичный Метод

public getDataChanged ( ) : boolean
Результат boolean

getDependencies() публичный Метод

public getDependencies ( ) : Dependency
Результат Dependency

getFileSize() публичный Метод

Get filesize
public getFileSize ( string $format = 'noformatting', $precision = 2 ) : string
$format string ('GB','MB','KB','B')
Результат string

getFileSystemPath() публичный Метод

Get full path to the asset on the filesystem
public getFileSystemPath ( ) : string
Результат string

getFilename() публичный Метод

public getFilename ( ) : string
Результат string

getFullPath() публичный Метод

Returns the full path of the document including the filename
public getFullPath ( ) : string
Результат string

getHasMetaData() публичный Метод

public getHasMetaData ( ) : boolean
Результат boolean

getId() публичный Метод

public getId ( ) : integer
Результат integer

getImageThumbnailSavePath() публичный Метод

public getImageThumbnailSavePath ( ) : string
Результат string

getKey() публичный Метод

Alias for getFilename()
public getKey ( ) : string
Результат string

getList() публичный статический Метод

public static getList ( array $config = [] ) : mixed
$config array
Результат mixed

getLocked() публичный Метод

Returns true if the element is locked
public getLocked ( ) : string
Результат string

getMetadata() публичный Метод

public getMetadata ( $name = null, $language = null ) : array
Результат array

getMimetype() публичный Метод

public getMimetype ( ) : string
Результат string

getModificationDate() публичный Метод

public getModificationDate ( ) : integer
Результат integer

getParent() публичный Метод

public getParent ( ) : Asset
Результат Asset

getParentId() публичный Метод

public getParentId ( ) : integer
Результат integer

getPath() публичный Метод

public getPath ( ) : string
Результат string

getProperties() публичный Метод

public getProperties ( ) : Property[]
Результат Property[]

getRealFullPath() публичный Метод

public getRealFullPath ( ) : string
Результат string

getRealPath() публичный Метод

public getRealPath ( ) : string
Результат string

getScheduledTasks() публичный Метод

public getScheduledTasks ( ) : array
Результат array

getSiblings() публичный Метод

Get a list of the sibling assets
public getSiblings ( ) : array
Результат array

getStream() публичный Метод

public getStream ( ) : resource
Результат resource

getTemporaryFile() публичный Метод

returns the path to a temp file
public getTemporaryFile ( ) : string
Результат string

getTotalCount() публичный статический Метод

public static getTotalCount ( array $config = [] ) : total
$config array
Результат total count

getType() публичный Метод

public getType ( ) : string
Результат string

getTypeFromMimeMapping() публичный статический Метод

returns the asset type of a filename and mimetype
public static getTypeFromMimeMapping ( $mimeType, $filename ) : integer | string
$mimeType
$filename
Результат integer | string

getTypes() публичный статический Метод

public static getTypes ( ) : array
Результат array

getUserModification() публичный Метод

public getUserModification ( ) : integer
Результат integer

getUserOwner() публичный Метод

public getUserOwner ( ) : integer
Результат integer

getVersions() публичный Метод

public getVersions ( ) : array
Результат array

getVideoThumbnailSavePath() публичный Метод

public getVideoThumbnailSavePath ( ) : string
Результат string

hasChildren() публичный Метод

public hasChildren ( ) : boolean
Результат boolean

hasSiblings() публичный Метод

Returns true if the asset has at least one sibling
public hasSiblings ( ) : boolean
Результат boolean

removeCustomSetting() публичный Метод

public removeCustomSetting ( $key )
$key

removeInheritedProperties() публичный Метод

renewInheritedProperties() публичный Метод

save() публичный Метод

public save ( )

saveScheduledTasks() публичный Метод

public saveScheduledTasks ( )

saveVersion() публичный Метод

public saveVersion ( boolean $setModificationDate = true, boolean $callPluginHook = true ) : null | Version
$setModificationDate boolean
$callPluginHook boolean
Результат null | Version

setCreationDate() публичный Метод

public setCreationDate ( integer $creationDate )
$creationDate integer

setCustomSetting() публичный Метод

public setCustomSetting ( string $key, mixed $value )
$key string
$value mixed

setCustomSettings() публичный Метод

public setCustomSettings ( array $customSettings )
$customSettings array

setData() публичный Метод

public setData ( mixed $data )
$data mixed

setDataChanged() публичный Метод

public setDataChanged ( boolean $changed = true )
$changed boolean

setFilename() публичный Метод

public setFilename ( string $filename )
$filename string

setHasMetaData() публичный Метод

public setHasMetaData ( boolean $hasMetaData )
$hasMetaData boolean

setId() публичный Метод

public setId ( integer $id )
$id integer

setLocked() публичный Метод

public setLocked ( $locked )
$locked

setMetadata() публичный Метод

public setMetadata ( array $metadata )
$metadata array

setMimetype() публичный Метод

public setMimetype ( string $mimetype )
$mimetype string

setModificationDate() публичный Метод

public setModificationDate ( integer $modificationDate )
$modificationDate integer

setParent() публичный Метод

public setParent ( Asset $parent )
$parent Asset

setParentId() публичный Метод

public setParentId ( integer $parentId )
$parentId integer

setPath() публичный Метод

public setPath ( string $path )
$path string

setProperties() публичный Метод

public setProperties ( array $properties )
$properties array

setProperty() публичный Метод

public setProperty ( $name, $type, $data, boolean $inherited = false, boolean $inheritable = false )
$name
$type
$data
$inherited boolean
$inheritable boolean

setScheduledTasks() публичный Метод

public setScheduledTasks ( $scheduledTasks )
$scheduledTasks

setStream() публичный Метод

public setStream ( $stream )
$stream

setType() публичный Метод

public setType ( string $type )
$type string

setUserModification() публичный Метод

public setUserModification ( integer $userModification )
$userModification integer

setUserOwner() публичный Метод

public setUserOwner ( integer $userOwner )
$userOwner integer

setVersions() публичный Метод

public setVersions ( array $versions )
$versions array

update() защищенный Метод

protected update ( )

Описание свойств

$_dataChanged защищенное свойство

Indicator if data has changed
protected bool $_dataChanged
Результат boolean

$childs публичное свойство

Contains the child elements
public array $childs
Результат array

$creationDate публичное свойство

Timestamp of creation
public int $creationDate
Результат integer

$customSettings публичное свойство

.. of the asset, ...
public array $customSettings
Результат array

$dependencies публичное свойство

Dependencies of this asset
public Dependency,Pimcore\Model $dependencies
Результат Dependency

$filename публичное свойство

Name of the file
public string $filename
Результат string

$hasChilds публичное свойство

Indicator if there are childs
public bool $hasChilds
Результат boolean

$hasMetaData публичное свойство

public bool $hasMetaData
Результат boolean

$hasSiblings публичное свойство

Indicator if document has siblings or not
public bool $hasSiblings
Результат boolean

$id публичное свойство

Unique ID
public int $id
Результат integer

$locked публичное свойство

enum('self','propagate') nullable
public string $locked
Результат string

$metadata публичное свойство

public array $metadata
Результат array

$mimetype публичное свойство

Mime-Type of the file
public string $mimetype
Результат string

$modificationDate публичное свойство

Timestamp of modification
public int $modificationDate
Результат integer

$parent публичное свойство

public Asset,Pimcore\Model $parent
Результат Asset

$parentId публичное свойство

ID of the parent asset
public int $parentId
Результат integer

$path публичное свойство

Path of the file, without the filename, only the full path of the parent asset
public string $path
Результат string

$properties публичное свойство

List of properties
public array $properties
Результат array

$scheduledTasks публичное свойство

Contains all scheduled tasks
public array $scheduledTasks
Результат array

$siblings публичное свойство

Contains a list of sibling documents
public array $siblings
Результат array

$stream публичное свойство

public resource $stream
Результат resource

$type публичное свойство

Type
public string $type
Результат string

$types публичное статическое свойство

possible types of an asset
public static array $types
Результат array

$userModification публичное свойство

ID of the user who make the latest changes
public int $userModification
Результат integer

$userOwner публичное свойство

ID of the owner user
public int $userOwner
Результат integer

$versions публичное свойство

List of versions
public array $versions
Результат array