Properties

$accessList

$accessList : array

The locale access list

Type

array — The list

$rootFolder

$rootFolder : string|null

internal root folder path

Type

string|null — The buffered folder

$is_system

$is_system : boolean

Is a system widget

Type

boolean — The buffered status

Methods

__construct()

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

Widget constructor.

Parameters

string $path

Name of the folder

string $language

The local instance language

SearchFields()

SearchFields() : array

The search fields

Returns

array

Instance()

Instance(boolean  $instance = false) : \FAA\Widget\Master|null|\stdClass

Build instance of this widget

Parameters

boolean $instance

Returns

\FAA\Widget\Master|null|\stdClass

Endpoints()

Endpoints(boolean  $resolved = false) : array<mixed,\FAA\Obj\Endpoint>

Get list end points of this widget

Parameters

boolean $resolved

Returns

array<mixed,\FAA\Obj\Endpoint>

ReadExtraAccessList()

ReadExtraAccessList() : array|null

Fetch the additional access list

Returns

array|null

ReadAccessList()

ReadAccessList() : array|null

Fetch the access list

Returns

array|null

CheckAccess()

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

Check single group permission

Parameters

string $group

The group id

string $flag

The permission to check, defaults to 'call'

Returns

boolean —

Has permission

GetTplPath()

GetTplPath(string  $file, string  $context = '') : boolean|string

Get path to a template file of this widget

Parameters

string $file

The file name

string $context

Returns

boolean|string —

The found file path or false

MirrorPermissions()

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

Mirror permissions of one group to another

Parameters

string $source

Source group id

string $target

Target group id

Returns

\FAA\Obj\Result

A system result

Update()

Update(  $payload) : \FAA\Obj\Result|null

Update instance and save to file system

Parameters

$payload

Returns

\FAA\Obj\Result|null

UpdateAccessList()

UpdateAccessList(array  $input) : \FAA\Obj\Result

Save new permission sets

Does an automated split when non system groups are involved

Parameters

array $input

The new permissions

Returns

\FAA\Obj\Result

A system result

Save()

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

Save the instance

Will save the widget data and clear the caches

Parameters

boolean $force_new_id

New id needed: Not as this is a named content

Returns

\FAA\Obj\Result

A system result

UpdateEndpoints()

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

Update endpoints

Will save to file, stage data and clear caches

Parameters

array $data

The new end points

Returns

\FAA\Obj\Result

A system result

IsSystem()

IsSystem() : boolean

Is system widget

This method is cached in property

Returns

boolean —

Is it system?

Name()

Name() : string

The widgets lower case name

Returns

string —

The name

GetRootFolder()

GetRootFolder() : string

The root path getter

Returns

string

ToPlainObject()

ToPlainObject(string  $language = null, boolean  $withparent = 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 $withparent

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

Returns

Object —

A simple attribute based php object

Delete()

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

Delete this widget

Parameters

boolean $skip

Needed but not used

Returns

\FAA\Obj\Result

A system result