FlexDirectoryInterface
extends
FlexAuthorizeInterface
in
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
clearCache()
public
clearCache() : $this
Return values
$thiscreateCollection()
public
createCollection(array<string|int, mixed> $entries[, string|null $keyField = null ]) : FlexCollectionInterface
Parameters
- $entries : array<string|int, mixed>
- $keyField : string|null = null
Tags
Return values
FlexCollectionInterfacecreateIndex()
public
createIndex(array<string|int, mixed> $entries[, string|null $keyField = null ]) : FlexIndexInterface
Parameters
- $entries : array<string|int, mixed>
- $keyField : string|null = null
Tags
Return values
FlexIndexInterfacecreateObject()
public
createObject(array<string|int, mixed> $data[, string $key = '' ][, bool $validate = false ]) : FlexObjectInterface
Parameters
- $data : array<string|int, mixed>
- $key : string = ''
- $validate : bool = false
Return values
FlexObjectInterfacegetAuthorizeRule()
public
getAuthorizeRule(string $scope, string $action) : string
Parameters
- $scope : string
- $action : string
Return values
stringgetBlueprint()
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
BlueprintgetBlueprintFile()
public
getBlueprintFile([string $view = '' ]) : string
Parameters
- $view : string = ''
Return values
stringgetCache()
public
getCache([string|null $namespace = null ]) : CacheInterface
Parameters
- $namespace : string|null = null
Return values
CacheInterfacegetCollection()
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
Return values
FlexCollectionInterfacegetCollectionClass()
public
getCollectionClass() : string
Return values
stringgetConfig()
public
getConfig([string|null $name = null ][, mixed $default = null ]) : mixed
Parameters
- $name : string|null = null
- $default : mixed = null
getDescription()
public
getDescription() : string
Return values
stringgetDirectoryConfigUri()
public
getDirectoryConfigUri([string|null $name = null ]) : string
Parameters
- $name : string|null = null
Return values
stringgetFlexType()
public
getFlexType() : string
Return values
stringgetIndex()
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
Return values
FlexIndexInterfacegetIndexClass()
public
getIndexClass() : string
Return values
stringgetMediaFolder()
public
getMediaFolder([string|null $key = null ]) : string|null
Parameters
- $key : string|null = null
Return values
string|nullgetObject()
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|nullgetObjectClass()
public
getObjectClass() : string
Return values
stringgetStorage()
public
getStorage() : FlexStorageInterface
Return values
FlexStorageInterfacegetStorageFolder()
public
getStorageFolder([string|null $key = null ]) : string|null
Parameters
- $key : string|null = null
Return values
string|nullgetTitle()
public
getTitle() : string
Return values
stringisAuthorized()
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|nullisEnabled()
public
isEnabled() : bool
Return values
boolisListed()
public
isListed() : bool
Return values
boolloadCollection()
public
loadCollection(array<string|int, mixed> $entries[, string|null $keyField = null ]) : FlexCollectionInterface
Parameters
- $entries : array<string|int, mixed>
- $keyField : string|null = null
Tags
Return values
FlexCollectionInterfacereloadIndex()
public
reloadIndex() : void