JsonDataAccessController
extends Controller
in package
implements
JsonAdapter
JsonController for DataAccess
Tags
Table of Contents
Interfaces
- JsonAdapter
- JSON Adapter for JSON requests
Properties
Methods
- __call() : mixed
- Route methods like getName(), getType(), getDirectory(), etc.
- __construct() : mixed
- Creates new controller
- getAccessableMethods() : array<string|int, mixed>
- Returns an array of method names accessable from a JSON request
- getDataAccessReadOnlySearch() : DataElement
- Get search item to select DataAccess entities that have read-only permissions.
- getDataAccessSearch() : DataElement
- Get search element to select DataAccess entities.
- getDefaultPermissions() : Permission
- Returns default permission as object
- getMessagesAsString() : string
- Returns all messages as string
- getName() : string
- Returns the internal name used as identifier for this adapter
- getSystemComponentController() : SystemComponentController
- Returns the main controller
- getValue() : string
- Value callback for ApiKey. Empties the field for copy form.
- storeSelectedDataAccess() : mixed
- Adds the selected DataAccess entities and removes the old ones.
- getAllDataAccessValues() : array<string|int, mixed>
- Get all available DataAccess entities.
- getDataAccessValues() : array<string|int, mixed>
- Get an array with all DataAccess entities and the selected ones separately from each other.
- getSearch() : DataElement
- Get the DataElement to select the data entries
- getSelectedDataAccessValues() : array<string|int, mixed>
- Get all selected DataAccess entities and separates them from read-only and normal units.
Properties
$cx
Main class instance
protected
Cx
$cx
= null
$messages
List of messages
protected
array<string|int, mixed>
$messages
= array()
Methods
__call()
Route methods like getName(), getType(), getDirectory(), etc.
public
__call(string $methodName, array<string|int, mixed> $arguments) : mixed
Parameters
- $methodName : string
-
Name of method to call
- $arguments : array<string|int, mixed>
-
List of arguments for the method to call
Attributes
- #[ReturnTypeWillChange]
Return values
mixed —Return value of the method to call
__construct()
Creates new controller
public
__construct(SystemComponentController $systemComponentController, Cx $cx) : mixed
Parameters
- $systemComponentController : SystemComponentController
-
Main controller for this system component
- $cx : Cx
-
Main class instance
getAccessableMethods()
Returns an array of method names accessable from a JSON request
public
getAccessableMethods() : array<string|int, mixed>
Return values
array<string|int, mixed> —List of method names
getDataAccessReadOnlySearch()
Get search item to select DataAccess entities that have read-only permissions.
public
getDataAccessReadOnlySearch(mixed $args) : DataElement
Parameters
- $args : mixed
-
array arguments from formfield callback
Return values
DataElement —search element
getDataAccessSearch()
Get search element to select DataAccess entities.
public
getDataAccessSearch(mixed $args) : DataElement
Parameters
- $args : mixed
-
array arguments from formfield callback
Return values
DataElement —search element
getDefaultPermissions()
Returns default permission as object
public
getDefaultPermissions() : Permission
Return values
PermissiongetMessagesAsString()
Returns all messages as string
public
getMessagesAsString() : string
Return values
string —HTML encoded error messages
getName()
Returns the internal name used as identifier for this adapter
public
getName() : string
Return values
string —Name of this adapter
getSystemComponentController()
Returns the main controller
public
getSystemComponentController() : SystemComponentController
Return values
SystemComponentController —Main controller for this system component
getValue()
Value callback for ApiKey. Empties the field for copy form.
public
getValue(array<string|int, mixed> $args) : string
Parameters
- $args : array<string|int, mixed>
-
Arguments for valueCallback
Return values
string —Value for ApiKey field
storeSelectedDataAccess()
Adds the selected DataAccess entities and removes the old ones.
public
storeSelectedDataAccess(mixed $args) : mixed
Parameters
- $args : mixed
-
array contains the ApiKey entity and the selected DataAccess entities, normal and read-only are separated.
Tags
getAllDataAccessValues()
Get all available DataAccess entities.
protected
getAllDataAccessValues() : array<string|int, mixed>
Return values
array<string|int, mixed> —contains all available DataAccess entities
getDataAccessValues()
Get an array with all DataAccess entities and the selected ones separately from each other.
protected
getDataAccessValues(mixed $apiKeyId) : array<string|int, mixed>
Parameters
- $apiKeyId : mixed
-
int Id of edited API-Key
Return values
array<string|int, mixed> —contains all DataAccess entities
getSearch()
Get the DataElement to select the data entries
protected
getSearch(mixed $name, mixed $data) : DataElement
Parameters
- $name : mixed
-
string name of the element
- $data : mixed
-
array data to select
Return values
DataElement —the search element
getSelectedDataAccessValues()
Get all selected DataAccess entities and separates them from read-only and normal units.
protected
getSelectedDataAccessValues(mixed $apiKeyId) : array<string|int, mixed>
Parameters
- $apiKeyId : mixed
-
int Id of edited API-Key
Return values
array<string|int, mixed> —contains all selected DataAccess entities