class RouteThemeListener

Class RouteThemeListener is injected as controller.pre_execute_listener service. Listens for kernel.view event and render provided template with params

Constants

SESSION_THEME_PARAM

Frontend theme request param

SESSION_THEME_NAME

Frontend theme name

SESSION_BACKEND_THEME_PARAM

Backend theme request param

SESSION_FRONT_THEME_DIR_KEY

SESSION_BACKEND_THEME_DIR_KEY

SESSION_FRONT_THEME_DIR

Path to frontend theme directory

SESSION_BACKEND_THEME_DIR

Path to backend theme directory

SESSION_BACKEND_THEME_NAME

Backend name theme

Methods

__construct(EngineInterface $templateEngine, Client $cache)

No description

preExecute(GetResponseForControllerResultEvent $event)

Match appropriate template, check is frontend or backend, prepare data and render template. Listens for kernel.view event

mixed
generateNewTemplate(string $template, string $namespace)

Generate template location based on namespace (theme)

Details

at line 69
__construct(EngineInterface $templateEngine, Client $cache)

Parameters

EngineInterface $templateEngine
Client $cache

at line 81
preExecute(GetResponseForControllerResultEvent $event)

Match appropriate template, check is frontend or backend, prepare data and render template. Listens for kernel.view event

Parameters

GetResponseForControllerResultEvent $event

Exceptions

Exception

at line 138
mixed generateNewTemplate(string $template, string $namespace)

Generate template location based on namespace (theme)

Parameters

string $template
string $namespace

Return Value

mixed