PHP Класс Backend\Core\Engine\Base\Action

Автор: Tijs Verkoyen ([email protected])
Автор: Frederik Heyninck ([email protected])
Автор: Davy Hellemans ([email protected])
Наследование: extends Object
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$URL Backend\Core\Engine\Url A reference to the URL-instance
$tpl Backend\Core\Engine\TwigTemplate A reference to the current template

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

Свойство Тип Описание
$header Backend\Core\Engine\Header The header object
$parameters array The parameters (urldecoded)

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

Метод Описание
__construct ( Symfony\Component\HttpKernel\KernelInterface $kernel ) The constructor will set some properties. It populates the parameter array with urldecoded values for easy-use.
checkToken ( ) Check if the token is ok
createForm ( string | Symfony\Component\Form\FormTypeInterface $type, mixed $data = null, array $options = [] ) : Form Creates and returns a Form instance from the type of the form.
display ( string $template = null ) Display, this wil output the template to the browser If no template is specified we build the path form the current module and action
execute ( ) Execute the action
getParameter ( string $key, string $type = 'string', mixed $defaultValue = null ) : mixed Get a parameter for a given key The function will return null if the key is not available By default we will cast the return value into a string, if you want something else specify it by passing the wanted type.

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

Метод Описание
getBackendModulePath ( ) : string
parse ( ) Parse to template

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

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

The constructor will set some properties. It populates the parameter array with urldecoded values for easy-use.
public __construct ( Symfony\Component\HttpKernel\KernelInterface $kernel )
$kernel Symfony\Component\HttpKernel\KernelInterface

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

Check if the token is ok
public checkToken ( )

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

Creates and returns a Form instance from the type of the form.
public createForm ( string | Symfony\Component\Form\FormTypeInterface $type, mixed $data = null, array $options = [] ) : Form
$type string | Symfony\Component\Form\FormTypeInterface The built type of the form
$data mixed The initial data for the form
$options array Options for the form
Результат Symfony\Component\Form\Form

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

Display, this wil output the template to the browser If no template is specified we build the path form the current module and action
public display ( string $template = null )
$template string The template to use, if not provided it will be based on the action.

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

Execute the action
public execute ( )

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

protected getBackendModulePath ( ) : string
Результат string

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

Get a parameter for a given key The function will return null if the key is not available By default we will cast the return value into a string, if you want something else specify it by passing the wanted type.
public getParameter ( string $key, string $type = 'string', mixed $defaultValue = null ) : mixed
$key string The name of the parameter.
$type string The return-type, possible values are: bool, boolean, int, integer, float, double, string, array.
$defaultValue mixed The value that should be returned if the key is not available.
Результат mixed

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

Parse to template
protected parse ( )

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

$URL публичное свойство

A reference to the URL-instance
public Url,Backend\Core\Engine $URL
Результат Backend\Core\Engine\Url

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

The header object
protected Header,Backend\Core\Engine $header
Результат Backend\Core\Engine\Header

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

The parameters (urldecoded)
protected array $parameters
Результат array

$tpl публичное свойство

A reference to the current template
public TwigTemplate,Backend\Core\Engine $tpl
Результат Backend\Core\Engine\TwigTemplate