PHP Class Pimcore\Model\Document\Dao

Inheritance: extends Pimcore\Model\Element\Dao, use trait Pimcore\Model\Element\ChildsCompatibilityTrait
ファイルを表示 Open project: pimcore/pimcore Class Usage Examples

Public Methods

Method Description
create ( ) Insert a new row to the database.
delete ( ) Delete the row from the database. (based on the model id)
deleteAllPermissions ( ) : void Deletes all user permissions based on the document id.
deleteAllProperties ( ) : void Deletes all object properties from the database.
deleteAllTasks ( ) : void Deletes all scheduled tasks assigned to the document.
getById ( $id ) Fetch a row by an id from the database and assign variables to the document model.
getByPath ( $path ) Fetch a row by a path from the database and assign variables to the model.
getChildAmount ( User $user = null ) : integer Returns the amount of children (not recursively),
getCurrentFullPath ( ) : string Returns the current full document path from the database.
getNextIndex ( ) : string Fetches the maximum index value from siblings.
getProperties ( $onlyInherited = false, $onlyDirect = false ) : [] Returns properties for the object from the database and assigns these.
hasChildren ( ) : boolean Checks if there are children.
hasSiblings ( ) : boolean Checks if the document has siblings
isAllowed ( $type, $user ) : boolean Checks if the action is allowed.
isLocked ( ) : boolean Checks if the document is locked.
saveIndex ( $index ) Save the document index.
unlockPropagate ( ) Deletes locks from the document and its children.
update ( ) Update the row in the database. (based on the model id)
updateChildsPaths ( $oldPath ) : array Updates children path in order to the old document path specified in the $oldPath parameter.
updateLocks ( ) Update the lock value for the document.
updateWorkspaces ( ) Update document workspaces.

Method Details

create() public method

Insert a new row to the database.
public create ( )

delete() public method

Delete the row from the database. (based on the model id)
public delete ( )

deleteAllPermissions() public method

Deletes all user permissions based on the document id.
public deleteAllPermissions ( ) : void
return void

deleteAllProperties() public method

Deletes all object properties from the database.
public deleteAllProperties ( ) : void
return void

deleteAllTasks() public method

Deletes all scheduled tasks assigned to the document.
public deleteAllTasks ( ) : void
return void

getById() public method

Fetch a row by an id from the database and assign variables to the document model.
public getById ( $id )
$id

getByPath() public method

Fetch a row by a path from the database and assign variables to the model.
public getByPath ( $path )
$path

getChildAmount() public method

Returns the amount of children (not recursively),
public getChildAmount ( User $user = null ) : integer
$user User
return integer

getCurrentFullPath() public method

Returns the current full document path from the database.
public getCurrentFullPath ( ) : string
return string

getNextIndex() public method

Fetches the maximum index value from siblings.
public getNextIndex ( ) : string
return string

getProperties() public method

Returns properties for the object from the database and assigns these.
public getProperties ( $onlyInherited = false, $onlyDirect = false ) : []
return []

hasChildren() public method

Checks if there are children.
public hasChildren ( ) : boolean
return boolean

hasSiblings() public method

Checks if the document has siblings
public hasSiblings ( ) : boolean
return boolean

isAllowed() public method

Checks if the action is allowed.
public isAllowed ( $type, $user ) : boolean
$type
$user
return boolean

isLocked() public method

Checks if the document is locked.
public isLocked ( ) : boolean
return boolean

saveIndex() public method

Save the document index.
public saveIndex ( $index )
$index

unlockPropagate() public method

Deletes locks from the document and its children.
public unlockPropagate ( )

update() public method

Update the row in the database. (based on the model id)
public update ( )

updateChildsPaths() public method

Updates children path in order to the old document path specified in the $oldPath parameter.
public updateChildsPaths ( $oldPath ) : array
$oldPath
return array

updateLocks() public method

Update the lock value for the document.
public updateLocks ( )

updateWorkspaces() public method

.
public updateWorkspaces ( )