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

$root

$root :

Type

$known_events

$known_events :

Type

—Event[]

Methods

__construct()

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

Instance project Construct a new project object

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

FetchRelation()

FetchRelation(integer  $id,string  $language = null,string  $type = 'amountrelation'): \FAA\Obj\Generic\AmountRelation

Get relation

Fetch an amount relation object by id

Parameters

integer $id

The relation id

string $language

The language to resolve by

string $type

The relation type

Returns

\FAA\Obj\Generic\AmountRelation

A system relation object

UpdateAttributeName()

UpdateAttributeName(\stdClass  $attr,string  $data): \FAA\Obj\Result

Callback on update validate name

This function is called when the primary identifier is changed

Parameters

\stdClass $attr

The changed attribute

string $data

The new attribute value

Returns

\FAA\Obj\Result —

A system result object

RegisteredEvent()

RegisteredEvent(  $name): \FAA\Obj\Sys\Event|null

Get registered event

Parameters

$name

Returns

\FAA\Obj\Sys\Event|null

AddArticle()

AddArticle(string  $type,array  $data): \FAA\Obj\Result

Assign and create article in this storage folder

Parameters

string $type

The article type

array $data

Data of the article assignment

Returns

\FAA\Obj\Result —

A system result object