PHP Класс Pimcore\Model\Document

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

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

Свойство Тип Описание
$childs array Contains a list of child-documents
$creationDate integer timestamp of creationdate
$dependencies Dependency Dependencies for this document
$hasChilds boolean Indicator of document has childs or not.
$hasSiblings boolean Indicator if document has siblings or not
$id integer ID of the document
$index integer Sorter index in the tree, can also be used for generating a navigation and so on
$key string Filename/Key of the document
$locked string Check if the document is locked.
$modificationDate integer timestamp of modificationdate
$parent Document The parent document.
$parentId integer ID of the parent document, on root document this is null
$path string Path to the document, not conaining the key (the full path of the parent document)
$properties array List of Property, concerning the folder
$published boolean published or not
$siblings array Contains a list of sibling documents
$type string Type of the document as string (enum) Possible values: page,snippet,link,folder
$types array possible types of a document
$userModification integer User-ID of the user last modified the document
$userOwner integer User-ID of the owner
$userPermissions Permissions for the user which requested this document in editmode*

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

Метод Описание
__sleep ( )
__wakeup ( )
addDocumentType ( $type ) Add document type to the $types array. It defines additional document types available in Pimcore.
clearDependentCache ( array $additionalTags = [] ) : void Clear the cache related to the document.
correctPath ( ) : void Validate the document path.
create ( integer $parentId, array $data = [], $save = true ) : Document Static helper to quickly create a new document
delete ( ) : void Deletes the document
doHideUnpublished ( ) : boolean Checks if unpublished documents should be hidden.
getById ( integer $id ) : Document | Email | Folder | Hardlink | Link | Page | Printcontainer | Printpage | Snippet | Newsletter Static helper to get a Document by it's ID
getByPath ( string $path ) : Document | Email | Folder | Hardlink | Link | Page | Printcontainer | Printpage | Snippet Static helper to get a Document by it's path
getChildren ( $unpublished = false ) : array Get a list of the Childs (not recursivly)
getCreationDate ( ) : integer Returns the document creation date.
getDependencies ( ) : Dependency Returns the dependencies of the document
getFullPath ( ) : string Returns the full path of the document including the key (path+key)
getId ( ) : integer Returns the document id.
getIndex ( ) : integer Returns the document index.
getKey ( ) : string Returns the document key.
getList ( array $config = [] ) : Listing Returns the documents list instance.
getLocked ( ) : string Returns true if the element is locked
getModificationDate ( ) : integer Return the document modification date.
getParent ( ) : Document Returns the parent document instance.
getParentId ( ) : integer Returns the id of the parent document.
getPath ( ) : string Returns the document path.
getProperties ( ) : Property[] Get a list of properties (including the inherited)
getPublished ( ) : boolean Checks if the document is published.
getRealFullPath ( ) : string Returns the full real path of the document.
getRealPath ( ) : string Returns the real document path.
getSiblings ( boolean $unpublished = false ) : array Get a list of the sibling documents
getTotalCount ( array $config = [] ) : integer Get total count of documents.
getType ( ) : string Returns the document type.
getTypes ( ) : string get possible types
getUserModification ( ) : integer Returns id of the user last modified the document.
getUserOwner ( ) : integer Returns the id of the owner user.
hasChildren ( ) : boolean Returns true if the document has at least one child
hasSiblings ( ) : boolean Returns true if the document has at least one sibling
isPublished ( ) : boolean Checks if the document is published.
removeInheritedProperties ( ) : void Removes all inherited properties.
renewInheritedProperties ( ) : void Renews all inherited properties.
save ( ) : Document Save the document.
saveIndex ( integer $index ) : void Update the document index.
setChildren ( $children ) : array set the children of the document
setCreationDate ( integer $creationDate ) : Document Set the creation date of the document.
setHideUnpublished ( boolean $flag ) Set true if want to hide documents.
setId ( integer $id ) : Document Set the id of the document.
setIndex ( integer $index ) : Document Set the document index.
setKey ( integer $key ) : Document Set the document key.
setLocked ( $locked ) : Document Mark the document as locked.
setModificationDate ( integer $modificationDate ) : Document Set the document modification date.
setParent ( Document $parent ) : Document Set the parent document instance.
setParentId ( integer $parentId ) : Document Set the parent id of the document.
setPath ( string $path ) : Document Set the document path.
setProperties ( array $properties ) : Document Set document properties.
setProperty ( string $name, string $type, mixed $data, boolean $inherited = false, boolean $inheritable = true ) : Document Set the document property.
setPublished ( integer $published ) : Document Set the publish status of the document.
setType ( integer $type ) : Document Set the document type.
setUserModification ( integer $userModification ) : Document Set id of the user last modified the document.
setUserOwner ( integer $userOwner ) : Document Set the id of the owner user.

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

Метод Описание
prepareFrontendPath ( $path ) : mixed
update ( )

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

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

public __sleep ( )

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

public __wakeup ( )

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

Add document type to the $types array. It defines additional document types available in Pimcore.
public static addDocumentType ( $type )
$type

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

Clear the cache related to the document.
public clearDependentCache ( array $additionalTags = [] ) : void
$additionalTags array
Результат void

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

Validate the document path.
public correctPath ( ) : void
Результат void

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

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

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

Deletes the document
public delete ( ) : void
Результат void

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

Checks if unpublished documents should be hidden.
public static doHideUnpublished ( ) : boolean
Результат boolean

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

Static helper to get a Document by it's ID
public static getById ( integer $id ) : Document | Email | Folder | Hardlink | Link | Page | Printcontainer | Printpage | Snippet | Newsletter
$id integer
Результат Document | Email | Folder | Hardlink | Link | Page | Printcontainer | Printpage | Snippet | Newsletter

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

Static helper to get a Document by it's path
public static getByPath ( string $path ) : Document | Email | Folder | Hardlink | Link | Page | Printcontainer | Printpage | Snippet
$path string
Результат Document | Email | Folder | Hardlink | Link | Page | Printcontainer | Printpage | Snippet

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

Get a list of the Childs (not recursivly)
public getChildren ( $unpublished = false ) : array
Результат array

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

Returns the document creation date.
public getCreationDate ( ) : integer
Результат integer

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

Returns the dependencies of the document
public getDependencies ( ) : Dependency
Результат Dependency

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

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

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

Returns the document id.
public getId ( ) : integer
Результат integer

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

Returns the document index.
public getIndex ( ) : integer
Результат integer

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

Returns the document key.
public getKey ( ) : string
Результат string

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

Returns the documents list instance.
public static getList ( array $config = [] ) : Listing
$config array
Результат Pimcore\Model\Document\Listing

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

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

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

Return the document modification date.
public getModificationDate ( ) : integer
Результат integer

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

Returns the parent document instance.
public getParent ( ) : Document
Результат Document

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

Returns the id of the parent document.
public getParentId ( ) : integer
Результат integer

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

Returns the document path.
public getPath ( ) : string
Результат string

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

Get a list of properties (including the inherited)
public getProperties ( ) : Property[]
Результат Property[]

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

Checks if the document is published.
public getPublished ( ) : boolean
Результат boolean

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

Returns the full real path of the document.
public getRealFullPath ( ) : string
Результат string

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

Returns the real document path.
public getRealPath ( ) : string
Результат string

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

Get a list of the sibling documents
public getSiblings ( boolean $unpublished = false ) : array
$unpublished boolean
Результат array

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

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

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

Returns the document type.
public getType ( ) : string
Результат string

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

get possible types
public static getTypes ( ) : string
Результат string

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

Returns id of the user last modified the document.
public getUserModification ( ) : integer
Результат integer

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

Returns the id of the owner user.
public getUserOwner ( ) : integer
Результат integer

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

Returns true if the document has at least one child
public hasChildren ( ) : boolean
Результат boolean

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

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

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

Checks if the document is published.
public isPublished ( ) : boolean
Результат boolean

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

protected prepareFrontendPath ( $path ) : mixed
$path
Результат mixed

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

Removes all inherited properties.
public removeInheritedProperties ( ) : void
Результат void

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

Renews all inherited properties.
public renewInheritedProperties ( ) : void
Результат void

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

Save the document.
public save ( ) : Document
Результат Document

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

Update the document index.
public saveIndex ( integer $index ) : void
$index integer
Результат void

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

set the children of the document
public setChildren ( $children ) : array
Результат array

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

Set the creation date of the document.
public setCreationDate ( integer $creationDate ) : Document
$creationDate integer
Результат Document

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

Set true if want to hide documents.
public static setHideUnpublished ( boolean $flag )
$flag boolean

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

Set the id of the document.
public setId ( integer $id ) : Document
$id integer
Результат Document

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

Set the document index.
public setIndex ( integer $index ) : Document
$index integer
Результат Document

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

Set the document key.
public setKey ( integer $key ) : Document
$key integer
Результат Document

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

Mark the document as locked.
public setLocked ( $locked ) : Document
$locked
Результат Document

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

Set the document modification date.
public setModificationDate ( integer $modificationDate ) : Document
$modificationDate integer
Результат Document

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

Set the parent document instance.
public setParent ( Document $parent ) : Document
$parent Document
Результат Document

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

Set the parent id of the document.
public setParentId ( integer $parentId ) : Document
$parentId integer
Результат Document

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

Set the document path.
public setPath ( string $path ) : Document
$path string
Результат Document

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

Set document properties.
public setProperties ( array $properties ) : Document
$properties array
Результат Document

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

Set the document property.
public setProperty ( string $name, string $type, mixed $data, boolean $inherited = false, boolean $inheritable = true ) : Document
$name string
$type string
$data mixed
$inherited boolean
$inheritable boolean
Результат Document

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

Set the publish status of the document.
public setPublished ( integer $published ) : Document
$published integer
Результат Document

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

Set the document type.
public setType ( integer $type ) : Document
$type integer
Результат Document

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

Set id of the user last modified the document.
public setUserModification ( integer $userModification ) : Document
$userModification integer
Результат Document

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

Set the id of the owner user.
public setUserOwner ( integer $userOwner ) : Document
$userOwner integer
Результат Document

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

protected update ( )

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

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

Contains a list of child-documents
public array $childs
Результат array

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

timestamp of creationdate
public int $creationDate
Результат integer

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

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

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

Indicator of document has childs or not.
public bool $hasChilds
Результат boolean

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

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

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

ID of the document
public int $id
Результат integer

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

Sorter index in the tree, can also be used for generating a navigation and so on
public int $index
Результат integer

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

Filename/Key of the document
public string $key
Результат string

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

Check if the document is locked.
public string $locked
Результат string

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

timestamp of modificationdate
public int $modificationDate
Результат integer

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

The parent document.
public Document,Pimcore\Model $parent
Результат Document

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

ID of the parent document, on root document this is null
public int $parentId
Результат integer

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

Path to the document, not conaining the key (the full path of the parent document)
public string $path
Результат string

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

List of Property, concerning the folder
public array $properties
Результат array

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

published or not
public bool $published
Результат boolean

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

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

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

Type of the document as string (enum) Possible values: page,snippet,link,folder
public string $type
Результат string

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

possible types of a document
public static array $types
Результат array

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

User-ID of the user last modified the document
public int $userModification
Результат integer

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

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

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

Permissions for the user which requested this document in editmode*
public $userPermissions