Properties

$id

$id : 

Type

$language

$language : 

Type

$path

$path : 

Type

$type

$type : 

Type

$version

$version : 

Type

$data

$data : 

Type

$originaldata

$originaldata : 

Type

$state

$state : 

Type

$git_repo

$git_repo : 

Type

$local

$local : 

Type

$assignable

$assignable : 

Type

$recently_added

$recently_added : 

Type

$encrypted

$encrypted : null

Indicator if this is an encrypted content type

Type

null

$rights

$rights : array

The available rights

Type

array — List of rights

$_access_list

$_access_list : null|array

The locale access list

Type

null|array — The list

$template

$template : null|\FAA\Obj\Generic\Template

The template

A local instance of the assigned template

Type

null|\FAA\Obj\Generic\Template

$_data_storage

$_data_storage : string

The root path

Type

string

Methods

__construct()

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

Construct Construct a new folder object

Parameters

string $path

The relative object storage path

string $language

The setup language

__get()

__get(string  $name) : mixed|null

Magic getter function

Parameters

string $name

The value name

Returns

mixed|null

GitRepo()

GitRepo() : \FAA\Git|null

Get the related git instance

Will open a git instance on demand, this method is cached locally

Returns

\FAA\Git|null

Id()

Id() : integer|string

Expose the object id

Provide an interface to extract the current id, can be numeric or string

Returns

integer|string —

The id as fixed value

Data()

Data() : array

Direct get data method

Returns

array

RecentlyAdded()

RecentlyAdded() : boolean

Was recently added

Returns

boolean

IsAssignable()

IsAssignable() : boolean|null

Is assignable Check if this is an assignable content type

Returns

boolean|null

Existing()

Existing() : boolean

Check if this instance is existing in the file system

Returns

boolean

FormattedId()

FormattedId(string  $prefix, string  $pad_string = '0', integer  $pad_length = 5, integer  $pad_type = STR_PAD_LEFT) : string

expose the formatted object id provide an interface to extract the current id with formatting options

Parameters

string $prefix

A prefix

string $pad_string

The pad character

integer $pad_length

The padding length

integer $pad_type

The padding type

Returns

string —

The formatted id

GetVersion()

GetVersion() : string

expose the GIT revision provide an interface to extract the current version hash

Returns

string —

the object version

GetLanguage()

GetLanguage() : string

expose the language provide an interface to extract the current language

Returns

string —

the object language

SetLanguage()

SetLanguage(string  $language) 

Set the language of this instance

Parameters

string $language

The language key

GetState()

GetState() : \FAA\Obj\Result

Expose the state Provide an interface to extract the current status

Returns

\FAA\Obj\Result

the object status

SetPlainAttribute()

SetPlainAttribute(string  $keys, mixed  $value) 

set a plain attribute update or add a plain attribute to this object

Parameters

string $keys

The searched attribute key

mixed $value

The new value

GetPlainOriginalAttribute()

GetPlainOriginalAttribute(string  $key, string  $language = '') : mixed

Get original value get a plain resolved attribute value from the local storage

Parameters

string $key

The searched attribute key

string $language

The searched language key or false for all

Returns

mixed —

The found value

GetPlainAttribute()

GetPlainAttribute(string  $key, string  $language = '') : mixed

get plain value get a plain resolved attribute value from the local storage

Parameters

string $key

The searched attribute key

string $language

The searched language key or false for all

Returns

mixed —

The found value

Contains()

Contains(array  $filter, string  $language = null) : boolean

Check if attribute contains the search string

Matches the filters against the given attribute selected

Parameters

array $filter

List of filters with operation, target attribute and value attr string The attribute to check op string The search operator e.g. LIKE value string The search string * matches all

string $language

The loader value to get the attributes in

Returns

boolean —

When matching true

GetType()

GetType() : string

expose the type provide an interface to extract the current type of this object

Returns

string —

the object type name

LastSaveTime()

LastSaveTime() : integer

Get save time

Expose the last save time of main object file provide an interface to extract the last save time

Returns

integer —

the object last save time

GetCreationTime()

GetCreationTime() : string|null

Get creation time

Expose the creation time of main object file provide an interface to extract the time when the file was generated or, registered in git

Returns

string|null

GetPlainOfRevision()

GetPlainOfRevision(string  $hash, boolean  $tolerate_error = false) : \FAA\Obj\Result

Fetch a certain version of a file based on the given hash

Parameters

string $hash

The git revision hash

boolean $tolerate_error

Ignore index errors on demand

Returns

\FAA\Obj\Result

A system result object

GetListOfRevisions()

GetListOfRevisions() : \FAA\Obj\Result

List versions

Load and provide a list of stored revisions for this objects. Will use git to determinate this list.

Returns

\FAA\Obj\Result

A system result object

GetRelativePath()

GetRelativePath() : string

expose the storage path provide an interface to extract the current path of this object

Returns

string —

the object storage path

StorageRoot()

StorageRoot() : string

Ger storage root Get the storage root folder, absolute

Returns

string —

The storage root folder

GetPath()

GetPath() : string

expose the storage path provide an interface to extract the current path of this object

Returns

string —

the object storage path

Delete()

Delete(boolean  $skip = false, boolean  $full = false) : \FAA\Obj\Result

delete entity from file system and git repo this method can delete this content object from our local storage system

Parameters

boolean $skip

Skip hooks on demand

boolean $full

Delete also the assigned contents

Returns

\FAA\Obj\Result

A default system result set

Convert()

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

Convert to other object type

Parameters

string $target

The target name

Returns

\FAA\Obj\Result

The conversion result

Copy()

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

clone object entry in file system and git repository store the current payload inside the system storage and commit the changes to the local repository

Parameters

mixed $target

For compatibility reasons with several subtypes this argument is required

Returns

\FAA\Obj\Result

A default system result set

Save()

Save(boolean  $force_new_id = false) : \FAA\Obj\Result

Save this folder entry in file system and git repo

Store the current payload inside the system storage and stage the changes to the local repository. Will handle prepared rename operation as well when the storage paths was changed by changing the key.

Parameters

boolean $force_new_id

Create with new id when set to true

Returns

\FAA\Obj\Result

A default system result set

SearchFields()

SearchFields() : array

Get search fields

Create a array of search fields. The type can be i,d,s,dt

Returns

array —

A list of search fields, with field, type and value

GeneralSearchFields()

GeneralSearchFields() : array

Get list of general search fields

Returns

array

ToPlainReducedObject()

ToPlainReducedObject(array  $fields, string  $language = null) : Object

Convert to reduced plain data set Translate and expose the current data attribute as plain resolved object with filtered attributes

Parameters

array $fields

List of attributes to show

string $language

A system language code or empty for raw setup

Returns

Object —

A simple attribute based php object

ToPlainObject()

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

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

\stdClass —

A simple attribute based php object

GetRelativeFolderPath()

GetRelativeFolderPath() : string

Get relative path Return the relative path to data list file

Returns

string —

The relative path

GetAccessPath()

GetAccessPath() : string

Get access path Return the absolute path to access list file

Returns

string —

The absolute path

GetParent()

GetParent() : \FAA\Obj\Generic\Folder|null

Get parent object

Get the parent folder object. This method is cached

Returns

\FAA\Obj\Generic\Folder|null —

The parent folder or, when root reached null

Parents()

Parents() : array<mixed,\FAA\Obj\Generic\Folder>

Get list of parents

Returns

array<mixed,\FAA\Obj\Generic\Folder>

SeoTitle()

SeoTitle(string  $l, boolean  $fallback = true) : string|null

Get translated seo title

Parameters

string $l

The target language

boolean $fallback

When true and seo field is empty it will return the real title

Returns

string|null —

The found translation

SeoDescription()

SeoDescription(string  $l, boolean  $fallback = true) : string|null

Get translated seo description

Parameters

string $l

The target language

boolean $fallback

When true and seo field is empty it will return the real description

Returns

string|null —

The found translation

HasUniversalCache()

HasUniversalCache() 

CheckAccess()

CheckAccess(string  $group, string  $flag = 'view') : boolean

Check access Test if the group has the given right

Parameters

string $group

Group id

string $flag

Right key to test against

Returns

boolean —

True when group access given

UpdateAccessRules()

UpdateAccessRules(array  $data) : \FAA\Obj\Result

update access rules for this folder update and store the access rules file, also do the stage operation

Parameters

array $data

A list of access rules like given from GetAccessRules()

Returns

\FAA\Obj\Result

A system result object

MirrorPermissions()

MirrorPermissions(string  $source, string  $target) : \FAA\Obj\Result

Mirror the permissions of a certain base group to a target group

Parameters

string $source

The source group

string $target

The target group

Returns

\FAA\Obj\Result

A result object

GetAccessRules()

GetAccessRules() : \FAA\Obj\Result

Get the access list

This method is cached by object cache.

Returns

\FAA\Obj\Result

A system result

FetchRelation()

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

Get relation Fetch a relation object by id

Parameters

integer $id

The relation id

string $language

The language to resolve by

string $type

The language to resolve by

Returns

\FAA\Obj\Generic\Relation

A system relation object

FetchExtension()

FetchExtension(integer  $id, string  $language = null) : \FAA\Obj\Generic\Extension

Get extension relation Fetch a extension relation object by id

Parameters

integer $id

The relation id

string $language

The language to resolve by

Returns

\FAA\Obj\Generic\Extension

A system extension relation object

CountRelations()

CountRelations() : integer

Count the relations of the folder

Returns

integer

Contents()

Contents(string  $language = null, boolean  $recursive = false, boolean  $include_extensions = false) : array<mixed,\FAA\Obj\Generic\Relation>

Get raw list of child relations for this folder Reads all content children relations of this folder and returns them as plain list

Parameters

string $language

The language to load the child nodes in

boolean $recursive

When set to true all sub nodes will be listed

boolean $include_extensions

When set to true include extension relations

Returns

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

A list of children with type Relation

GetDirectory()

GetDirectory() : string

expose root path cut the index.json from the localy stored path argument

Returns

string —

absolute path to the root node of this folder

GetTemplatePath()

GetTemplatePath() : string

expose main template path abstract method to load the path to the index template

Returns

string —

absolute path to the main template

GetLoginTemplatePath()

GetLoginTemplatePath() : string

expose login template path abstract method to load the path to the index template

Returns

string —

absolute path to the login template

Create()

Create(string  $dir, array  $payload) : \FAA\Obj\Result

Create a new folder Abstract method to create a new pysical folder

Parameters

string $dir

A system object storage path relative

array $payload

A folder dataset defined in Obj\Folder

Returns

\FAA\Obj\Result

A system result object

UpdateAttributeShort()

UpdateAttributeShort(  $attr,   $data) 

Parameters

$attr
$data

GetTemplate()

GetTemplate() : \FAA\Obj\Generic\Template

load template abstract method to load the assigned template and return as object

Returns

\FAA\Obj\Generic\Template

A system template object covered in a result object

GetTplPath()

GetTplPath(string  $file, string  $ext = 'html') : string

load template path abstract method to load the path to a file from assigned template object will return null if file not found or template not registered

Parameters

string $file

Name of the template file that

string $ext

File extension of searched template

Returns

string —

Absolute path to the template or null if none was found

GetTemplateHook()

GetTemplateHook(\FAA\Obj\Request  $request) : null|object

Get template hook function Load the template hook of this folder will return null when folder han none

Parameters

\FAA\Obj\Request $request

Returns

null|object

LinkTarget()

LinkTarget() : string|null

Return the active link target When the folder is a link and has a defined target folder, then, return the target folder path

Returns

string|null

LinkTargetFolder()

LinkTargetFolder() : \FAA\Obj\Generic\Folder|null

Return the active link target folder

When the folder is a link return the set target folder object

Returns

\FAA\Obj\Generic\Folder|null —

The instance or, null

loadFromSrcCached()

loadFromSrcCached() 

Load the instance values from storage

loadFromSrc()

loadFromSrc() 

Load data from source

Fetch the content master file for this entry by given path The data will be stored in the local data property, when the data is encrypted it will be locally decrypted This function has not return value but a side effect on status. It will handle the cases when an entity is encryped in a transparent way

GetNextOfSequence()

GetNextOfSequence() 

Get next id Load a new id from buffer and set it as primary key

Has side effect to set the local states

setPlainSubAttribute()

setPlainSubAttribute(array  $target, mixed  $value, string  $path) 

set a sub attribute update or add a plain attribute to this object this method will resolve the . separated path until the end of the limb is reached and $this->data was updated

Parameters

array $target

A reference tho the this->data branch the update is target of

mixed $value

The new value

string $path

The remaining path components to target

reload()

reload()