class Folder extends Document (View source)

Traits

Properties

static array $types possible types of a document from Document
integer $id ID of the document from Document
integer $parentId ID of the parent document, on root document this is null from Document
Document $parent The parent document. from Document
string $type static type of this object
string $key Filename/Key of the document from Document
string $path Path to the document, not conaining the key (the full path of the parent document) from Document
integer $index Sorter index in the tree, can also be used for generating a navigation and so on from Document
bool $published published or not from Document
integer $creationDate timestamp of creationdate from Document
integer $modificationDate timestamp of modificationdate from Document
integer $userOwner User-ID of the owner from Document
integer $userModification User-ID of the user last modified the document from Document
$userPermissions Permissions for the user which requested this document in editmode* from Document
Dependency $dependencies Dependencies for this document from Document
array $properties List of Property, concerning the folder from Document
array $childs Contains a list of child-documents from Document
boolean $hasChilds Indicator of document has childs or not. from Document
array $siblings Contains a list of sibling documents from Document
boolean $hasSiblings Indicator if document has siblings or not from Document
string $locked Check if the document is locked. from Document

Methods

Dao
getDao()

No description

setDao($dao)

No description

getResource() deprecated

No description

initDao(null $key = null, bool $forceDetection = false)

No description

$this
setValues(array $data = array())

No description

$this
setValue($key, $value)

No description

array
__sleep()

No description

from Document
mixed
__call($method, $args)

No description

void
__clone()

No description

array
getObjectVars()

returns object values without the dao

void
beginTransaction()

No description

void
commit()

No description

void
rollBack()

No description

void
configure()

No description

array
getValidTableColumns(string $table, bool $cache)

No description

void
resetValidTableColumnsCache(string $table)

No description

mixed
getProperty(string $name, bool $asContainer = false)

Get specific property data or the property object itself ($asContainer=true) by its name, if the property doesn't exists return null

bool
hasProperty($name)

No description

removeProperty($name)

No description

string
getCacheTag()

get the cache tag for the element

array
getCacheTags(array $tags = array())

Get the cache tags for the element, resolve all dependencies to tag the cache entries This is necessary to update the cache if there is a change in an depended object

array
resolveDependencies()

Resolves the dependencies of the element and returns an array of them - Used by update()

void
isLocked()

Returns true if the element is locked

array
getUserPermissions()

No description

boolean
isAllowed(string $type)

This is used for user-permissions, pass a permission type (eg. list, view, save) an you know if the current user is allowed to perform the requested action

unlockPropagate()

No description

boolean
hasNoChilds()

Inverted hasChilds()

string
__toString()

No description

mixed
getChilds() deprecated

No description

mixed
setChilds() deprecated

No description

mixed
hasChilds() deprecated

No description

static 
addDocumentType($type)

Add document type to the $types array. It defines additional document types available in Pimcore.

from Document
static 
setHideUnpublished(bool $flag)

Set true if want to hide documents.

from Document
static bool
doHideUnpublished()

Checks if unpublished documents should be hidden.

from Document
static array
getTypes()

get possible types

from Document
getByPath(string $path)

Static helper to get a Document by it's path

from Document
getById($id)

Static helper to get a Document by it's ID

from Document
static Document
create($parentId, $data = array(), $save = true)

Static helper to quickly create a new document

from Document
static Listing
getList(array $config = array())

Returns the documents list instance.

from Document
static int
getTotalCount(array $config = array())

Get total count of documents.

from Document
save()

Save the document.

from Document
void
correctPath()

Validate the document path.

from Document
void
saveIndex(int $index)

Update the document index.

from Document
void
clearDependentCache(array $additionalTags = array())

Clear the cache related to the document.

from Document
getDependencies()

Returns the dependencies of the document

from Document
array
setChildren($children)

set the children of the document

from Document
array
getChildren(bool $unpublished = false)

Get a list of the Childs (not recursivly)

from Document
boolean
hasChildren()

Returns true if the document has at least one child

from Document
array
getSiblings(bool $unpublished = false)

Get a list of the sibling documents

from Document
bool
hasSiblings()

Returns true if the document has at least one sibling

from Document
string
getLocked()

Returns true if the element is locked

from Document
void
setLocked(bool $locked)

Mark the document as locked.

from Document
void
delete()

Deletes the document

from Document
string
getFullPath()

Returns the full path of the document including the key (path+key)

from Document
integer
getCreationDate()

Returns the document creation date.

from Document
integer
getId()

Returns the document id.

from Document
string
getKey()

Returns the document key.

from Document
integer
getModificationDate()

Return the document modification date.

from Document
integer
getParentId()

Returns the id of the parent document.

from Document
string
getPath()

Returns the document path.

from Document
string
getRealPath()

Returns the real document path.

from Document
string
getRealFullPath()

Returns the full real path of the document.

from Document
void
setCreationDate(integer $creationDate)

Set the creation date of the document.

from Document
setId(integer $id)

Set the id of the document.

from Document
setKey(integer $key)

Set the document key.

from Document
void
setModificationDate(integer $modificationDate)

Set the document modification date.

from Document
setParentId(integer $parentId)

Set the parent id of the document.

from Document
setPath(string $path)

Set the document path.

from Document
integer
getIndex()

Returns the document index.

from Document
setIndex(integer $index)

Set the document index.

from Document
string
getType()

Returns the document type.

from Document
setType(integer $type)

Set the document type.

from Document
integer
getUserModification()

Returns id of the user last modified the document.

from Document
integer
getUserOwner()

Returns the id of the owner user.

from Document
void
setUserModification(integer $userModification)

Set id of the user last modified the document.

from Document
void
setUserOwner(integer $userOwner)

Set the id of the owner user.

from Document
boolean
isPublished()

Checks if the document is published.

from Document
boolean
getPublished()

Checks if the document is published.

from Document
setPublished(integer $published)

Set the publish status of the document.

from Document
array
getProperties()

Get a list of properties (including the inherited)

from Document
setProperties(array $properties)

Set document properties.

from Document
setProperty(string $name, string $type, mixed $data, bool $inherited = false, bool $inheritable = true)

Set the document property.

from Document
getParent()

Returns the parent document instance.

from Document
setParent(Document $parent)

Set the parent document instance.

from Document
__wakeup()

No description

from Document
void
removeInheritedProperties()

Removes all inherited properties.

from Document
void
renewInheritedProperties()

Renews all inherited properties.

from Document

Details

at line line 24
Dao getDao()

Return Value

Dao

AbstractModel setDao($dao)

Parameters

$dao

Return Value

AbstractModel

AbstractDao getResource() deprecated

deprecated

Return Value

AbstractDao

initDao(null $key = null, bool $forceDetection = false)

Parameters

null $key
bool $forceDetection

Exceptions

Exception

$this setValues(array $data = array())

Parameters

array $data

Return Value

$this

$this setValue($key, $value)

Parameters

$key
$value

Return Value

$this

in Document at line line 1295
array __sleep()

Return Value

array

mixed __call($method, $args)

Parameters

$method
$args

Return Value

mixed

Exceptions

Exception

void __clone()

Return Value

void

array getObjectVars()

returns object values without the dao

Return Value

array

void beginTransaction()

Return Value

void

void commit()

Return Value

void

void rollBack()

Return Value

void

void configure()

Return Value

void

array getValidTableColumns(string $table, bool $cache)

Parameters

string $table
bool $cache

Return Value

array

void resetValidTableColumnsCache(string $table)

Parameters

string $table

Return Value

void

mixed getProperty(string $name, bool $asContainer = false)

Get specific property data or the property object itself ($asContainer=true) by its name, if the property doesn't exists return null

Parameters

string $name
bool $asContainer

Return Value

mixed

bool hasProperty($name)

Parameters

$name

Return Value

bool

removeProperty($name)

Parameters

$name

string getCacheTag()

get the cache tag for the element

Return Value

string

array getCacheTags(array $tags = array())

Get the cache tags for the element, resolve all dependencies to tag the cache entries This is necessary to update the cache if there is a change in an depended object

Parameters

array $tags

Return Value

array

array resolveDependencies()

Resolves the dependencies of the element and returns an array of them - Used by update()

Return Value

array

void isLocked()

Returns true if the element is locked

Return Value

void

array getUserPermissions()

Return Value

array

boolean isAllowed(string $type)

This is used for user-permissions, pass a permission type (eg. list, view, save) an you know if the current user is allowed to perform the requested action

Parameters

string $type

Return Value

boolean

unlockPropagate()

boolean hasNoChilds()

Inverted hasChilds()

Return Value

boolean

string __toString()

Return Value

string

mixed getChilds() deprecated

deprecated

Return Value

mixed

mixed setChilds() deprecated

deprecated

Return Value

mixed

mixed hasChilds() deprecated

deprecated

Return Value

mixed

in Document at line line 44
static addDocumentType($type)

Add document type to the $types array. It defines additional document types available in Pimcore.

Parameters

$type

in Document at line line 61
static setHideUnpublished(bool $flag)

Set true if want to hide documents.

Parameters

bool $flag

in Document at line line 71
static bool doHideUnpublished()

Checks if unpublished documents should be hidden.

Return Value

bool

in Document at line line 219
static array getTypes()

get possible types

Return Value

array

in Document at line line 229
static Document|Email|Folder|Hardlink|Link|Page|Printcontainer|Printpage|Snippet getByPath(string $path)

Static helper to get a Document by it's path

Parameters

string $path

Return Value

Document|Email|Folder|Hardlink|Link|Page|Printcontainer|Printpage|Snippet

in Document at line line 253
static ElementInterface getById($id)

Static helper to get a Document by it's ID

Parameters

$id

Return Value

ElementInterface $resource

in Document at line line 314
static Document create($parentId, $data = array(), $save = true)

Static helper to quickly create a new document

Parameters

$parentId
$data
$save

Return Value

Document

in Document at line line 338
static Listing getList(array $config = array())

Returns the documents list instance.

Parameters

array $config

Return Value

Listing

Exceptions

Exception

in Document at line line 358
static int getTotalCount(array $config = array())

Get total count of documents.

Parameters

array $config

Return Value

int count

in Document at line line 377
Document save()

Save the document.

Return Value

Document

Exceptions

Exception

in Document at line line 475
void correctPath()

Validate the document path.

Return Value

void

Exceptions

Exception

in Document at line line 579
void saveIndex(int $index)

Update the document index.

Parameters

int $index

Return Value

void

in Document at line line 591
void clearDependentCache(array $additionalTags = array())

Clear the cache related to the document.

Parameters

array $additionalTags

Return Value

void

in Document at line line 608
Dependency getDependencies()

Returns the dependencies of the document

Return Value

Dependency

in Document at line line 622
array setChildren($children)

set the children of the document

Parameters

$children

Return Value

array

in Document at line line 641
array getChildren(bool $unpublished = false)

Get a list of the Childs (not recursivly)

Parameters

bool $unpublished

Return Value

array

in Document at line line 661
boolean hasChildren()

Returns true if the document has at least one child

Return Value

boolean

in Document at line line 680
array getSiblings(bool $unpublished = false)

Get a list of the sibling documents

Parameters

bool $unpublished

Return Value

array

in Document at line line 701
bool hasSiblings()

Returns true if the document has at least one sibling

Return Value

bool

in Document at line line 718
string getLocked()

Returns true if the element is locked

Return Value

string

in Document at line line 733
void setLocked(bool $locked)

Mark the document as locked.

Parameters

bool $locked

Return Value

void

in Document at line line 745
void delete()

Deletes the document

Return Value

void

in Document at line line 790
string getFullPath()

Returns the full path of the document including the key (path+key)

Return Value

string

in Document at line line 895
integer getCreationDate()

Returns the document creation date.

Return Value

integer

in Document at line line 905
integer getId()

Returns the document id.

Return Value

integer $id

in Document at line line 915
string getKey()

Returns the document key.

Return Value

string

in Document at line line 925
integer getModificationDate()

Return the document modification date.

Return Value

integer

in Document at line line 935
integer getParentId()

Returns the id of the parent document.

Return Value

integer

in Document at line line 945
string getPath()

Returns the document path.

Return Value

string

in Document at line line 974
string getRealPath()

Returns the real document path.

Return Value

string

in Document at line line 984
string getRealFullPath()

Returns the full real path of the document.

Return Value

string

in Document at line line 997
void setCreationDate(integer $creationDate)

Set the creation date of the document.

Parameters

integer $creationDate

Return Value

void

in Document at line line 1010
Document setId(integer $id)

Set the id of the document.

Parameters

integer $id

Return Value

Document

in Document at line line 1023
Document setKey(integer $key)

Set the document key.

Parameters

integer $key

Return Value

Document

in Document at line line 1037
void setModificationDate(integer $modificationDate)

Set the document modification date.

Parameters

integer $modificationDate

Return Value

void

in Document at line line 1051
Document setParentId(integer $parentId)

Set the parent id of the document.

Parameters

integer $parentId

Return Value

Document

in Document at line line 1065
Document setPath(string $path)

Set the document path.

Parameters

string $path

Return Value

Document

in Document at line line 1077
integer getIndex()

Returns the document index.

Return Value

integer

in Document at line line 1088
Document setIndex(integer $index)

Set the document index.

Parameters

integer $index

Return Value

Document

in Document at line line 1100
string getType()

Returns the document type.

Return Value

string

in Document at line line 1111
Document setType(integer $type)

Set the document type.

Parameters

integer $type

Return Value

Document

in Document at line line 1123
integer getUserModification()

Returns id of the user last modified the document.

Return Value

integer

in Document at line line 1133
integer getUserOwner()

Returns the id of the owner user.

Return Value

integer

in Document at line line 1144
void setUserModification(integer $userModification)

Set id of the user last modified the document.

Parameters

integer $userModification

Return Value

void

in Document at line line 1157
void setUserOwner(integer $userOwner)

Set the id of the owner user.

Parameters

integer $userOwner

Return Value

void

in Document at line line 1169
boolean isPublished()

Checks if the document is published.

Return Value

boolean

in Document at line line 1179
boolean getPublished()

Checks if the document is published.

Return Value

boolean

in Document at line line 1190
Document setPublished(integer $published)

Set the publish status of the document.

Parameters

integer $published

Return Value

Document

in Document at line line 1202
array getProperties()

Get a list of properties (including the inherited)

Return Value

array

in Document at line line 1227
Document setProperties(array $properties)

Set document properties.

Parameters

array $properties

Return Value

Document

in Document at line line 1244
Document setProperty(string $name, string $type, mixed $data, bool $inherited = false, bool $inheritable = true)

Set the document property.

Parameters

string $name
string $type
mixed $data
bool $inherited
bool $inheritable

Return Value

Document

in Document at line line 1267
Document getParent()

Returns the parent document instance.

Return Value

Document

in Document at line line 1282
Document setParent(Document $parent)

Set the parent document instance.

Parameters

Document $parent

Return Value

Document

in Document at line line 1323
__wakeup()

in Document at line line 1348
void removeInheritedProperties()

Removes all inherited properties.

Return Value

void

in Document at line line 1367
void renewInheritedProperties()

Renews all inherited properties.

Return Value

void