class FolderHandler extends AbstractHandler (View source)

Handle operations with folders entities.

Properties

protected ObjectManager $objectManager from AbstractHandler
protected Folder|null $folder

Methods

ObjectManager
getObjectManager()

No description

setObjectManager(ObjectManager $objectManager)

No description

__construct(ObjectManager $objectManager)

AbstractHandler constructor.

int
cleanPositions(bool $setPositions = true)

Clean position for current folder siblings.

getFolder()

No description

$this
setFolder(Folder $folder)

No description

$this
removeWithChildrenAndAssociations()

Remove current folder with its children recursively and its associations.

Folder[]
getParents() deprecated

Return every folder’s parents.

string
getFullPath() deprecated

Get folder full path using folder names.

int
cleanChildrenPositions(bool $setPositions = true)

Reset current folder children positions.

int
cleanRootFoldersPositions(bool $setPositions = true)

Reset every root folders positions.

Details

ObjectManager getObjectManager()

Return Value

ObjectManager

AbstractHandler setObjectManager(ObjectManager $objectManager)

Parameters

ObjectManager $objectManager

Return Value

AbstractHandler

__construct(ObjectManager $objectManager)

AbstractHandler constructor.

Parameters

ObjectManager $objectManager

int cleanPositions(bool $setPositions = true)

Clean position for current folder siblings.

Parameters

bool $setPositions

Return Value

int Return the next position after the last entity

Folder getFolder()

Return Value

Folder

$this setFolder(Folder $folder)

Parameters

Folder $folder

Return Value

$this

$this removeWithChildrenAndAssociations()

Remove current folder with its children recursively and its associations.

Return Value

$this

Folder[] getParents() deprecated

deprecated Use directly Folder::getParents method.

Return every folder’s parents.

Return Value

Folder[]

string getFullPath() deprecated

deprecated Use directly Folder::getFullPath method.

Get folder full path using folder names.

Return Value

string

int cleanChildrenPositions(bool $setPositions = true)

Reset current folder children positions.

Warning, this method does not flush.

Parameters

bool $setPositions

Return Value

int Return the next position after the last folder

int cleanRootFoldersPositions(bool $setPositions = true)

Reset every root folders positions.

Warning, this method does not flush.

Parameters

bool $setPositions

Return Value

int Return the next position after the last folder