JsonLocaleController
extends Controller
in package
implements
JsonAdapter
JSON Adapter for Cx\Core\Locale\Model\Entity\Locale
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
- getGeneratedLabel() : string
- Generates a label according to iso1 and alpha2 code using the php Locale class
- getMessagesAsString() : string
- Returns all messages as string
- getName() : string
- Returns the internal name used as identifier for this adapter
- getPlaceholderDefaultValue() : string
- Gets the default value of a language placeholder according to the args
- getSystemComponentController() : SystemComponentController
- Returns the main controller
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
objectgetGeneratedLabel()
Generates a label according to iso1 and alpha2 code using the php Locale class
public
getGeneratedLabel(array<string|int, mixed> $arguments) : string
Parameters
- $arguments : array<string|int, mixed>
-
The arguments
Return values
string —Language (Country), e.g. English (United States)
getMessagesAsString()
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
getPlaceholderDefaultValue()
Gets the default value of a language placeholder according to the args
public
getPlaceholderDefaultValue(mixed $arguments) : string
Parameters
- $arguments : mixed
-
The arguments
Return values
string —The default value of the placeholder or empty string
getSystemComponentController()
Returns the main controller
public
getSystemComponentController() : SystemComponentController
Return values
SystemComponentController —Main controller for this system component