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

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

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

Свойство Тип Описание
$action string The current action
$breadcrumb Frontend\Core\Engine\Breadcrumb The breadcrumb object
$data mixed The data
$header Frontend\Core\Engine\Header The header object
$module string The current module
$pagination array Pagination array

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

Метод Описание
__construct ( Symfony\Component\HttpKernel\KernelInterface $kernel, string $module, string $action, string $data = null )
addCSS ( string $file, boolean $overwritePath = false, boolean $minify = true, boolean $addTimestamp = null ) Add a CSS file into the array
addJS ( string $file, boolean $overwritePath = false, boolean $minify = true, boolean $addTimestamp = null ) Add a javascript file into the array
addJSData ( string $key, mixed $value ) Add data that should be available in JS
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.
execute ( ) Execute the action If a javascript file with the name of the module or action exists it will be loaded.
getAction ( ) : string Get the action
getContent ( ) : string Get parsed template content.
getModule ( ) : string Get the module
getOverwrite ( ) : boolean Get overwrite mode
getTemplate ( ) : TwigTemplate Get template
getTemplatePath ( ) : string Get template path
redirect ( string $url, integer $code = 302 ) Redirect to a given URL

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

Метод Описание
loadTemplate ( string $path = null, boolean $overwrite = false ) Load the template
parsePagination ( string $query_parameter = 'page' ) Parse pagination
setMeta ( Meta $meta )
setOverwrite ( boolean $overwrite ) Set overwrite mode
setTemplatePath ( string $path ) Set the path for the template to include or to replace the current one

Приватные методы

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

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

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

public __construct ( Symfony\Component\HttpKernel\KernelInterface $kernel, string $module, string $action, string $data = null )
$kernel Symfony\Component\HttpKernel\KernelInterface
$module string The name of the module.
$action string The name of the action.
$data string The data that should be available in this block.

addCSS() публичный метод

Add a CSS file into the array
public addCSS ( string $file, boolean $overwritePath = false, boolean $minify = true, boolean $addTimestamp = null )
$file string The path for the CSS-file that should be loaded.
$overwritePath boolean Whether or not to add the module to this path. Module path is added by default.
$minify boolean Should the CSS be minified?
$addTimestamp boolean May we add a timestamp for caching purposes?

addJS() публичный метод

Add a javascript file into the array
public addJS ( string $file, boolean $overwritePath = false, boolean $minify = true, boolean $addTimestamp = null )
$file string The path to the javascript-file that should be loaded.
$overwritePath boolean Whether or not to add the module to this path. Module path is added by default.
$minify boolean Should the file be minified?
$addTimestamp boolean May we add a timestamp for caching purposes?

addJSData() публичный метод

Add data that should be available in JS
public addJSData ( string $key, mixed $value )
$key string The key whereunder the value will be stored.
$value mixed The value to pass.

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

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

Execute the action If a javascript file with the name of the module or action exists it will be loaded.
public execute ( )

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

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

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

Get parsed template content.
public getContent ( ) : string
Результат string

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

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

getOverwrite() публичный метод

Get overwrite mode
public getOverwrite ( ) : boolean
Результат boolean

getTemplate() публичный метод

Get template
public getTemplate ( ) : TwigTemplate
Результат Frontend\Core\Engine\TwigTemplate

getTemplatePath() публичный метод

Get template path
public getTemplatePath ( ) : string
Результат string

loadTemplate() защищенный метод

Load the template
protected loadTemplate ( string $path = null, boolean $overwrite = false )
$path string The path for the template to use.
$overwrite boolean Should the template overwrite the default?

parsePagination() защищенный метод

Parse pagination
protected parsePagination ( string $query_parameter = 'page' )
$query_parameter string

redirect() публичный метод

Redirect to a given URL
public redirect ( string $url, integer $code = 302 )
$url string The URL whereto will be redirected.
$code integer The redirect code, default is 302 which means this is a temporary redirect.

setMeta() защищенный метод

protected setMeta ( Meta $meta )
$meta Common\Doctrine\Entity\Meta

setOverwrite() защищенный метод

Set overwrite mode
protected setOverwrite ( boolean $overwrite )
$overwrite boolean true if the template should overwrite the current template, false if not.

setTemplatePath() защищенный метод

Set the path for the template to include or to replace the current one
protected setTemplatePath ( string $path )
$path string The path to the template that should be loaded.

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

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

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

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

The breadcrumb object
protected Breadcrumb,Frontend\Core\Engine $breadcrumb
Результат Frontend\Core\Engine\Breadcrumb

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

The data
protected mixed $data
Результат mixed

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

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

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

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

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

Pagination array
protected array $pagination
Результат array