PHP Class Frontend\Core\Engine\Block\Widget

Inheritance: extends Frontend\Core\Engine\Base\Object
Afficher le fichier Open project: forkcms/forkcms Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Symfony\Component\HttpKernel\KernelInterface $kernel, string $module, string $action, mixed $data = null )
execute ( ) Execute the action We will build the class name, require the class and call the execute method.
getAction ( ) : string Get the current action REMARK: You should not use this method from your code, but it has to be public so we can access it later on in the core-code
getContent ( ) : string
getCustomTemplate ( ) : string | null
getData ( ) : mixed Get the data
getForId ( Symfony\Component\HttpKernel\KernelInterface $kernel, string $module, string $action, integer | null $id = null ) : string | null
getModule ( ) : string Get the current module REMARK: You should not use this method from your code, but it has to be public so we can access it later on in the core-code
getTemplate ( ) : array Get the assigned template.
loadConfig ( ) Load the config file for the requested block.
render ( string $template = null ) : string Get the block content

Private Methods

Méthode Description
setAction ( string $action = null ) Set the action
setData ( mixed $data ) Set the data
setModule ( string $module ) Set the module

Method Details

__construct() public méthode

public __construct ( Symfony\Component\HttpKernel\KernelInterface $kernel, string $module, string $action, mixed $data = null )
$kernel Symfony\Component\HttpKernel\KernelInterface
$module string The module to load.
$action string The action to load.
$data mixed The data that was passed from the database.

execute() public méthode

Execute the action We will build the class name, require the class and call the execute method.
public execute ( )

getAction() public méthode

Get the current action REMARK: You should not use this method from your code, but it has to be public so we can access it later on in the core-code
public getAction ( ) : string
Résultat string

getContent() public méthode

public getContent ( ) : string
Résultat string

getCustomTemplate() public méthode

public getCustomTemplate ( ) : string | null
Résultat string | null

getData() public méthode

Get the data
public getData ( ) : mixed
Résultat mixed

getForId() public static méthode

public static getForId ( Symfony\Component\HttpKernel\KernelInterface $kernel, string $module, string $action, integer | null $id = null ) : string | null
$kernel Symfony\Component\HttpKernel\KernelInterface
$module string The module to load.
$action string The action to load.
$id integer | null This is not the modules_extra id but the id of the item itself
Résultat string | null if we have data it is still serialised since it will be unserialized in the constructor

getModule() public méthode

Get the current module REMARK: You should not use this method from your code, but it has to be public so we can access it later on in the core-code
public getModule ( ) : string
Résultat string

getTemplate() public méthode

Get the assigned template.
public getTemplate ( ) : array
Résultat array

loadConfig() public méthode

In the config file we have to find disabled actions, the constructor will read the folder and set possible actions Other configurations will be stored in it also.
public loadConfig ( )

render() public méthode

Get the block content
public render ( string $template = null ) : string
$template string
Résultat string