PHP Класс Frontend\Core\Engine\Base\AjaxAction

Наследование: extends KernelLoader
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$action string The current action
$content array
$module string The current module

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
setAction ( string $action ) Set the action, for later use
setModule ( string $module ) Set the module, for later use

Описание методов

__construct() публичный Метод

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() публичный Метод

Execute the action
public execute ( )

getAction() публичный Метод

Get the action
public getAction ( ) : string
Результат string

getContent() публичный Метод

With this function we'll be able to get the content and return it as a Symfony output object.
public getContent ( ) : Response
Результат Symfony\Component\HttpFoundation\Response

getModule() публичный Метод

Get the module
public getModule ( ) : string
Результат string

output() публичный Метод

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() защищенный Метод

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

setModule() защищенный Метод

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

Описание свойств

$action защищенное свойство

The current action
protected string $action
Результат string

$content защищенное свойство

protected array $content
Результат array

$module защищенное свойство

The current module
protected string $module
Результат string