SettingJsonController
extends Controller
in package
implements
JsonAdapter
This is the superclass for all Controller classes
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
- getDefaultPermissions() : object
- 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
- getUserSetting() : string
- Returns the value of a user setting for the current user
- setUserSetting() : void
- Sets the value of a user setting for the current user
Properties
$cx
Main class instance
protected
Cx
$cx
= null
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
getDefaultPermissions()
Returns default permission as object
public
getDefaultPermissions() : object
Return values
objectgetMessagesAsString()
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
getUserSetting()
Returns the value of a user setting for the current user
public
getUserSetting(array<string|int, mixed> $params) : string
Required GET params are "component", "group" and "name" to identify the requested setting.
Parameters
- $params : array<string|int, mixed>
-
JSON params
Return values
string —Value for the requested setting for the current user
setUserSetting()
Sets the value of a user setting for the current user
public
setUserSetting(array<string|int, mixed> $params) : void
Required GET params are "component", "group" and "name" to identify the requested setting and "value" for the value to set.
Parameters
- $params : array<string|int, mixed>
-
JSON params