\FAA\Obj\GenericFolderTree

Summary

Methods
Properties
Constants
__construct()
Name()
ToPlainObject()
SetChildrenInactive()
GetSort()
GetFilters()
Move()
Copy()
Children()
ToRecursiveObjectWithRelation()
ToRecursiveObject()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$children
$contents
N/A

Properties

$children

$children :array<mixed,\stdClass>

The child nodes

The child nodes as serializable entity

Type

array<mixed,\stdClass>—List of children

$contents

$contents :array<mixed,\stdClass>

The contents

The assigned child nodes as serializable entity

Type

array<mixed,\stdClass>—List of children

Methods

__construct()

__construct(string  $path,string  $language = null)

FolderTree constructor.

Construct a new folder tree object

Parameters

string $path

The relative object storage path

string $language

The setup language

Name()

Name(): string

Get name Get the folder name without /

Returns

string —

The folder name

ToPlainObject()

ToPlainObject(string  $language = null,boolean  $with_parent = true): Object

convert to plain data set translate and expose the current data attribute as plain resolved object

Parameters

string $language

A system language code or empty for raw setup

boolean $with_parent

When set to true the attributes will be resolved witch parent attributes included

Returns

Object —

A simple attribute based php object

SetChildrenInactive()

SetChildrenInactive()

Set children inactive Set all children inactive

GetSort()

GetSort(string  $language = null): array

Get the custom sorting definition for the folder

It is only possible to have 1 custom sort per position in the template. The last one in the list will win.

Parameters

string $language

Special for this language

Returns

array —

The list of sort commands

GetFilters()

GetFilters(): array

Get custom filters for this folder

It is only possible to have 1 filter per position in the template. The last one in the list will win.

Returns

array —

The list of filters for this folder

Move()

Move(string  $target): \FAA\Obj\Result

Move folder Move this folder to another system data folder.

Parameters

string $target

The target path, relative to folder root

Returns

\FAA\Obj\Result —

A system result object

Copy()

Copy(string  $target = null): \FAA\Obj\Result

Copy this folder

Parameters

string $target

The target folder

Returns

\FAA\Obj\Result —

A system result object

Children()

Children(string  $language = null,boolean  $plain = false): array<mixed,\FAA\Obj\Generic\FolderTree>

get raw list of children for this specific tree element reads all children of this folder and returns them as plain list

Parameters

string $language

The language to load the child nodes in

boolean $plain

Convert to plain on demand

Returns

array<mixed,\FAA\Obj\Generic\FolderTree> —

A list of children with type FolderTree

ToRecursiveObjectWithRelation()

ToRecursiveObjectWithRelation(  $language = null)

Parameters

$language

ToRecursiveObject()

ToRecursiveObject(string  $language = null): \stdClass

Convert to raw recursive tree element

Create a folder tree limb starting with the current folder

Parameters

string $language

The language to load the object in

Returns

\stdClass —

A plain raw system/php object