BaseHook
class BaseHook
The base class for hook. If you provide hooks in your module you have to extends this class.
These class provides some helper functions to retrieve object from the current session of the current user. It also provides a render function that allows you to get the right template file from different locations and allows you to override templates in your current template.
Class BaseHook
Constants
INJECT_TEMPLATE_METHOD_NAME |
|
Properties
BaseModule | $module | ||
ParserInterface | $parser | ||
TranslatorInterface | $translator | ||
AssetResolverInterface | $assetsResolver | ||
EventDispatcherInterface | $dispatcher |
Methods
This function is called when hook uses the automatic insert template.
helper function allowing you to render a template using a template engine
helper function allowing you to get the content of a file
helper function allowing you to generate the HTML link tag
helper function allowing you to generate the HTML script tag
No description
No description
No description
Add a new template for automatic render
No description
Details
at line 91
insertTemplate(
HookRenderEvent $event,
string $code)
This function is called when hook uses the automatic insert template.
at line 134
string
render(
string $templateName,
array $parameters = array())
helper function allowing you to render a template using a template engine
at line 155
string
dump(
string $fileName)
helper function allowing you to get the content of a file
at line 180
string
addCSS(
string $fileName,
array $attributes = array(),
array $filters = array())
helper function allowing you to generate the HTML link tag
at line 211
string
addJS(
string $fileName,
array $attributes = array(),
array $filters = array())
helper function allowing you to generate the HTML script tag
at line 236
setModule(
BaseModule $module)
at line 244
BaseModule
getModule()
at line 252
setParser(
ParserInterface $parser)
at line 260
ParserInterface
getParser()
at line 406
addTemplate(
string $hookCode,
string $value)
Add a new template for automatic render