PHP Class Frontend\Core\Engine\Base\AjaxAction

Inheritance: extends KernelLoader
Afficher le fichier Open project: forkcms/forkcms Class Usage Examples

Protected Properties

Свойство Type Description
$action string The current action
$content array
$module string The current module

Méthodes publiques

Méthode Description
__construct ( Symfony\Component\HttpKernel\KernelInterface $kernel, string $action, string $module )
execute ( ) Execute the action
getAction ( ) : string Get the action
getContent ( ) : Response Since the display action in the backend is rather complicated and we want to make this work with our Kernel, I've added this getContent method to extract the output from the actual displaying.
getModule ( ) : string Get the module
output ( integer $statusCode, mixed $data = null, string $message = null ) Outputs an answer to the browser

Méthodes protégées

Méthode Description
setAction ( string $action ) Set the action, for later use
setModule ( string $module ) Set the module, for later use

Method Details

__construct() public méthode

public __construct ( Symfony\Component\HttpKernel\KernelInterface $kernel, string $action, string $module )
$kernel Symfony\Component\HttpKernel\KernelInterface
$action string The action to use.
$module string The module to use.

execute() public méthode

Execute the action
public execute ( )

getAction() public méthode

Get the action
public getAction ( ) : string
Résultat string

getContent() public méthode

With this function we'll be able to get the content and return it as a Symfony output object.
public getContent ( ) : Response
Résultat Symfony\Component\HttpFoundation\Response

getModule() public méthode

Get the module
public getModule ( ) : string
Résultat string

output() public méthode

Outputs an answer to the browser
public output ( integer $statusCode, mixed $data = null, string $message = null )
$statusCode integer The status code to use, use one of the available constants (self::OK, self::BAD_REQUEST, self::FORBIDDEN, self::ERROR).
$data mixed The data to be returned (will be encoded as JSON).
$message string A text-message.

setAction() protected méthode

Set the action, for later use
protected setAction ( string $action )
$action string The action to use.

setModule() protected méthode

Set the module, for later use
protected setModule ( string $module )
$module string The module to use.

Property Details

$action protected_oe property

The current action
protected string $action
Résultat string

$content protected_oe property

protected array $content
Résultat array

$module protected_oe property

The current module
protected string $module
Résultat string