Documentation

FlexDirectoryInterface extends FlexAuthorizeInterface

Interface FlexDirectoryInterface

Table of Contents

Methods

clearCache()  : $this
createCollection()  : FlexCollectionInterface
createIndex()  : FlexIndexInterface
createObject()  : FlexObjectInterface
getAuthorizeRule()  : string
getBlueprint()  : Blueprint
Returns a new uninitialized instance of blueprint.
getBlueprintFile()  : string
getCache()  : CacheInterface
getCollection()  : FlexCollectionInterface
Get collection. In the site this will be filtered by the default filters (published etc).
getCollectionClass()  : string
getConfig()  : mixed
getDescription()  : string
getDirectoryConfigUri()  : string
getFlexType()  : string
getIndex()  : FlexIndexInterface
Get the full collection of all stored objects.
getIndexClass()  : string
getMediaFolder()  : string|null
getObject()  : FlexObjectInterface|null
Returns an object if it exists. If no arguments are passed (or both of them are null), method creates a new empty object.
getObjectClass()  : string
getStorage()  : FlexStorageInterface
getStorageFolder()  : string|null
getTitle()  : string
isAuthorized()  : bool|null
Check if user is authorized for the action.
isEnabled()  : bool
isListed()  : bool
loadCollection()  : FlexCollectionInterface
reloadIndex()  : void

Methods

createIndex()

public createIndex(array<string|int, mixed> $entries[, string|null $keyField = null ]) : FlexIndexInterface
Parameters
$entries : array<string|int, mixed>
$keyField : string|null = null
Tags
phpstan-return

FlexIndexInterface<FlexObjectInterface>

Return values
FlexIndexInterface

getAuthorizeRule()

public getAuthorizeRule(string $scope, string $action) : string
Parameters
$scope : string
$action : string
Return values
string

getBlueprint()

Returns a new uninitialized instance of blueprint.

public getBlueprint([string $type = '' ][, string $context = '' ]) : Blueprint

Always use $object->getBlueprint() or $object->getForm()->getBlueprint() instead.

Parameters
$type : string = ''
$context : string = ''
Return values
Blueprint

getBlueprintFile()

public getBlueprintFile([string $view = '' ]) : string
Parameters
$view : string = ''
Return values
string

getCollection()

Get collection. In the site this will be filtered by the default filters (published etc).

public getCollection([array<string|int, mixed>|null $keys = null ][, string|null $keyField = null ]) : FlexCollectionInterface

Use $directory->getIndex() if you want unfiltered collection.

Parameters
$keys : array<string|int, mixed>|null = null

Array of keys.

$keyField : string|null = null

Field to be used as the key.

Tags
phpstan-return

FlexCollectionInterface<FlexObjectInterface>

Return values
FlexCollectionInterface

getConfig()

public getConfig([string|null $name = null ][, mixed $default = null ]) : mixed
Parameters
$name : string|null = null
$default : mixed = null

getDirectoryConfigUri()

public getDirectoryConfigUri([string|null $name = null ]) : string
Parameters
$name : string|null = null
Return values
string

getIndex()

Get the full collection of all stored objects.

public getIndex([array<string|int, mixed>|null $keys = null ][, string|null $keyField = null ]) : FlexIndexInterface

Use $directory->getCollection() if you want a filtered collection.

Parameters
$keys : array<string|int, mixed>|null = null

Array of keys.

$keyField : string|null = null

Field to be used as the key.

Tags
phpstan-return

FlexIndexInterface<FlexObjectInterface>

Return values
FlexIndexInterface

getMediaFolder()

public getMediaFolder([string|null $key = null ]) : string|null
Parameters
$key : string|null = null
Return values
string|null

getObject()

Returns an object if it exists. If no arguments are passed (or both of them are null), method creates a new empty object.

public getObject([string|null $key = null ][, string|null $keyField = null ]) : FlexObjectInterface|null

Note: It is not safe to use the object without checking if the user can access it.

Parameters
$key : string|null = null
$keyField : string|null = null

Field to be used as the key.

Return values
FlexObjectInterface|null

getStorageFolder()

public getStorageFolder([string|null $key = null ]) : string|null
Parameters
$key : string|null = null
Return values
string|null

isAuthorized()

Check if user is authorized for the action.

public isAuthorized(string $action[, string|null $scope = null ][, UserInterface|null $user = null ]) : bool|null

Note: There are two deny values: denied (false), not set (null). This allows chaining multiple rules together when the previous rules were not matched.

Parameters
$action : string
$scope : string|null = null
$user : UserInterface|null = null
Return values
bool|null

        
On this page

Search results