JsonController
extends Controller
in package
implements
JsonAdapter
Class JsonController
Tags
Table of Contents
Interfaces
- JsonAdapter
- JSON Adapter for JSON requests
Properties
- $cx : Cx
- Main class instance
- $systemComponentController : SystemComponentController
- SystemComponentController for this Component
Methods
- __call() : mixed
- Route methods like getName(), getType(), getDirectory(), etc.
- __construct() : mixed
- Creates new controller
- activatePreset() : mixed
- Activate a preset
- addPreset() : array<string|int, mixed>
- Add a new preset
- 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
- removePreset() : mixed
- Remove a preset
- resetPreset() : mixed
- Reset a preset
- saveOptions() : mixed
- Save the options to the component.yml file.
- updateOption() : array<string|int, mixed>
- Update the value of a option for a specific template.
- clearCache() : mixed
Properties
$cx
Main class instance
protected
Cx
$cx
= null
$systemComponentController
SystemComponentController for this Component
private
SystemComponentController
$systemComponentController
= 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
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
activatePreset()
Activate a preset
public
activatePreset(array<string|int, mixed> $params) : mixed
Parameters
- $params : array<string|int, mixed>
-
List of get and post parameters which were sent to the json adapter.
addPreset()
Add a new preset
public
addPreset(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>
-
List of get and post parameters which were sent to the json adapter.
Return values
array<string|int, mixed> —Preset name
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
removePreset()
Remove a preset
public
removePreset(array<string|int, mixed> $params) : mixed
Parameters
- $params : array<string|int, mixed>
-
List of get and post parameters which were sent to the json adapter.
resetPreset()
Reset a preset
public
resetPreset(array<string|int, mixed> $params) : mixed
Parameters
- $params : array<string|int, mixed>
-
List of get and post parameters which were sent to the json adapter.
saveOptions()
Save the options to the component.yml file.
public
saveOptions(array<string|int, mixed> $params) : mixed
Parameters
- $params : array<string|int, mixed>
-
List of get and post parameters which were sent to the json adapter.
updateOption()
Update the value of a option for a specific template.
public
updateOption(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
- $params : array<string|int, mixed>
-
List of get and post parameters which were sent to the json adapter.
Return values
array<string|int, mixed> —Modified Data
clearCache()
protected
clearCache() : mixed