FileAccess Orion

Group extends NamedBaseContent
in package

Implement group object

In the fileAccess context most contents are children of base content. With this class the DAB for user groups setups is implemented. A group is a named object

Tags
category

Content type

author

Tobias Teichner webmaster@teichner.biz

since

File available since v0.1

Table of Contents

$  : string
$  : string
$key_regex  : string
The main key must match this regex
__construct()  : mixed
User group
Copy()  : Result
copy entity in file system and git repository this method can copy this content object in our local storage system to a new one
Delete()  : Result
delete entity from file system and git repository this method can delete this content object from our local storage system
GetPath()  : string|null
IsSystem()  : bool
Is a system group?
Name()  : string|null
Get the group name
Save()  : Result
save object entry in file system and git repository store the current payload inside the system storage and commit the changes to the local repository
ToPlainObject()  : stdClass
Convert to plain object
UpdateAttributeAlias()  : Result
Callback on update validate name

Properties

$key_regex

The main key must match this regex

private string $key_regex = '/^[a-z]+$/'

Methods

__construct()

User group

public __construct([string|null $id = null ][, string|null $language = null ]) : mixed

Construct a new user group object

Parameters
$id : string|null = null

The object name/id or null for new one

$language : string|null = null

The object language or null for raw one

Return values
mixed

Copy()

copy entity in file system and git repository this method can copy this content object in our local storage system to a new one

public Copy([string $target = null ]) : Result
Parameters
$target : string = null

The target name

Return values
Result

A default system result set

Delete()

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

public Delete([bool $skip = false ]) : Result
Parameters
$skip : bool = false

Skip hooks on demand

Return values
Result

A default system result set

GetPath()

public GetPath() : string|null
Tags
inheritDoc
Return values
string|null

IsSystem()

Is a system group?

public IsSystem() : bool
Return values
bool

Name()

Get the group name

public Name([string $language = FAA_DEFAULT_LANGUAGE ]) : string|null
Parameters
$language : string = FAA_DEFAULT_LANGUAGE
Return values
string|null

Save()

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

public Save([bool $force_new_id = false ]) : Result
Parameters
$force_new_id : bool = false

Indicate force new id on demand (local id empty)

Return values
Result

A default system result set

ToPlainObject()

Convert to plain object

public ToPlainObject([null $language = null ][, bool $with_parent = true ]) : stdClass
Parameters
$language : null = null
$with_parent : bool = true
Return values
stdClass

UpdateAttributeAlias()

Callback on update validate name

public UpdateAttributeAlias(object $attr, string $data) : Result

This function is called when the primary identifier is changed

Parameters
$attr : object

The changed attribute

$data : string

The new attribute value

Return values
Result

A system result object

Search results