AJAXRoute
in package
implements
IRoute
Table of Contents
Interfaces
- IRoute
- Interface IRequestAction
Properties
- $accessPermission : string|null
- $aliasResolver : mixed
- $contentFormatter : IContentFormatter|null
Methods
- __construct() : void
- Generates a new AJAX route with the given parameters
- accessPermission() : null|string
- Returns the required permission to execute this action, or null if it is not restricted.
- DefaultAliasResolver() : mixed
- The default alias resolver for AJAX routes
- exec() : mixed
- Executes the action and returns the result.
Properties
$accessPermission
private
string|null
$accessPermission
$aliasResolver
private
mixed
$aliasResolver
$contentFormatter
private
IContentFormatter|null
$contentFormatter
Methods
__construct()
Generates a new AJAX route with the given parameters
public
__construct([mixed $accessPermission = null ][, mixed $aliasResolver = null ][, IContentFormatter|null $contentFormatter = null ]) : void
Parameters
- $accessPermission : mixed = null
-
The access permission required to access this route (null if no permission is required)
- $aliasResolver : mixed = null
-
A function that resolves the alias of the route (default is a function that gets the "path" query parameter)
- $contentFormatter : IContentFormatter|null = null
-
The content formatter to use for this route (if null we try to get the requested one)
accessPermission()
Returns the required permission to execute this action, or null if it is not restricted.
public
accessPermission() : null|string
Return values
null|stringDefaultAliasResolver()
The default alias resolver for AJAX routes
public
static DefaultAliasResolver(mixed $parameterName) : mixed
Parameters
- $parameterName : mixed
-
The name of the parameter to get the alias from
exec()
Executes the action and returns the result.
public
exec(mixed $args) : mixed
Parameters
- $args : mixed