Extension
extends BaseRelation
in package
Table of Contents
- $storage : string
- is either a extension or a content relation
- __construct() : mixed
- Construct a new extension relation object
- Copy() : Result|null
- Copy this relation to a new folder
- Delete() : Result
- Delete relation
- Directory() : Folder
- GetFolder() : string
- Get the parent folder of the relation
- Move() : Result
- Move to other folder
- Save() : Result|void|null
- SearchFields() : array<string|int, mixed>
- Return search indexer fields Convert instance to search indexer values
Properties
$storage
is either a extension or a content relation
protected
string
$storage
= ''
The storage, extensions|relations
Methods
__construct()
Construct a new extension relation object
public
__construct(string $root[, string|null $id = null ][, string|null $language = null ]) : mixed
Parameters
- $root : string
-
The name or the path to the extension
- $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 this relation to a new folder
public
Copy([null $target = null ]) : Result|null
Parameters
- $target : null = null
Return values
Result|null —Delete()
Delete relation
public
Delete([bool $skip = false ]) : Result
Delete the relation and clear the content tree
Parameters
- $skip : bool = false
-
Skip hooks on demand
Return values
Result —A system result object
Directory()
public
Directory() : Folder
Return values
Folder —GetFolder()
Get the parent folder of the relation
public
GetFolder() : string
Return values
string —Move()
Move to other folder
public
Move(string $target[, string|null $position = null ][, int $order = -1 ][, bool $new_id = false ]) : Result
Parameters
- $target : string
-
Path to the target folder
- $position : string|null = null
-
The target position
- $order : int = -1
-
The new order offset
- $new_id : bool = false
-
When true register relation with new id
Return values
Result —A system result object
Save()
public
Save([false $force_new_id = false ]) : Result|void|null
Parameters
- $force_new_id : false = false
Return values
Result|void|null —SearchFields()
Return search indexer fields Convert instance to search indexer values
public
SearchFields() : array<string|int, mixed>
Return values
array<string|int, mixed> —The search indexer fields