ModelFiles module

Folder

A model in the Files module, with 15 members for templates, 11 API properties and 15 members for admin templates.

Files\Models\Frontend\Folder Files\Models\Api\Folder Files\Models\Backend\Folder Also in Files: FavoriteFilename FavoriteFolder File FileRevision Filename FilenameComment FolderComment Image ImageRevision SharedFilename VirtualFile
View
What Smarty and Twig templates receive. Properties in REST API responses and job payloads. What admin screen templates receive when you override them.

Templates view

Properties 14

Take no arguments.

# getId()
?int
# getName()
?string
# getCreated()
?DateTime
Get the date the record was created.
# getModified()
?DateTime
Get the last modification date for the record.
# getHidden()
?DateTime
# isHidden()
bool
# getParent()
?Folder
# getFilenames()
?Collection<Filename>
# getChildren()
?Collection<Folder>
# getPath()
string
Get the path for the folder including subfolders. Also makes sure the path does not contain any forbidden characters by escaping them.
# getComments()
?Collection<FolderComment>
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned

Methods 1

Take arguments. The API serialises only getters that need none.

# hasFolderInParents(Folder $folder)
bool
Check whether this folder has the given folder as one of his parents

API & Jobs view

API & JobsEach property is a key in REST API responses and job payloads. Its name is the template getter without get, is or has. Methods that need arguments are not available here.

Properties 11

Read-only values on the record.

# id
?int
# name
?string
# created
?DateTime
Get the date the record was created.
# modified
?DateTime
Get the last modification date for the record.
# hidden
?DateTime
# hidden
bool
# parent
?Folder
# filenames
?Collection<Filename>
# children
?Collection<Folder>
# path
string
Get the path for the folder including subfolders. Does not include leading or trailing slashes. Part of the entity (instead of the model) as it is required for cache clearing.

Admin view

AdminAvailable in cdna-admin templates. Copy an admin template into your site repository to change how this record is edited.

Properties 14

Take no arguments.

# getId()
?int
# getName()
?string
# getCreated()
?DateTime
Get the date the record was created.
# getModified()
?DateTime
Get the last modification date for the record.
# getHidden()
?DateTime
# isHidden()
bool
# getParent()
?Folder
# getFilenames()
?Collection<Filename>
# getChildren()
?Collection<Folder>
# getPath()
string
Get the path for the folder including subfolders. Does not include leading or trailing slashes. Part of the entity (instead of the model) as it is required for cache clearing.
# getComments()
?Collection<FolderComment>
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned

Methods 1

Take arguments. The API serialises only getters that need none.

# hasFolderInParents(Folder $folder)
bool
Check whether this folder has the given folder as one of his parents