StaticPagesBlockElementsListener
class StaticPagesBlockElementsListener extends AbstractBlockElementListener
Class StaticPagesBlockElementsListener is listener class for handling logic for block elements
Properties
| protected BasicEntityManagerInterface | $manager | from AbstractBlockElementListener | |
| protected BasicEntityManagerInterface | $listener | from AbstractBlockElementListener |
Methods
AbstractBlockElementListener constructor.
Return content of twig file. This content should contain call to extension and include template to be rendered.
Return array of elements containing id and entity name This will be used for display on edit page Name of entity must have key 'name'
Example of twig content: {% set data = alligator_get_static_pages_by_id([".implode(',', $paramBag['entityIds'])."]) %} {% set title = "'.$paramBag['title'].'" %} {% include [currentTheme ~ \'/Plugins/EmpireBlockElementsPlugin/views/'.$paramBag['template'].'\', \'@blockElementsPluginViews/'.$paramBag['template'].'\'] ignore missing %}
No description
No description
Details
in AbstractBlockElementListener at line 61
__construct(BasicEntityManagerInterface $manager, BaseAbstractBlockElementListener $listener, mixed $class)
AbstractBlockElementListener constructor.
in AbstractBlockElementListener at line 99
final EventWithResult
getEntityData(EventWithResult $event)
Return array of data for add/edit Data must contain
'entityName' -> name of the entity - will be displayed to user. Example 'Static Page' 'entityKey' -> key to be used - same as entityName but as one word. Example 'static_page' 'searchRouteName' -> route name for entity search. Use jQgrid route. Example 'backend_static_page_all_json' 'searchField' -> field to be searched - title of entity. Example 'title' 'language' -> if entity is language dependant
in AbstractBlockElementListener at line 115
final EventWithResult
getTwigContent(EventWithResult $event)
Return content of twig file. This content should contain call to extension and include template to be rendered.
in AbstractBlockElementListener at line 143
final EventWithResult
getAlgorithmParams(EventWithResult $event)
Return array of params for selected algorithm
in AbstractBlockElementListener at line 165
final EventWithResult
getNames(EventWithResult $event)
Return array of elements containing id and entity name This will be used for display on edit page Name of entity must have key 'name'
in AbstractBlockElementListener at line 178
EventWithResult
getAlgorithms(EventWithResult $event)
Returns filtered list of algorithms
in AbstractBlockElementListener at line 212
protected string
renderTwigTemplate(array $paramBag)
Example of twig content: {% set data = alligator_get_static_pages_by_id([".implode(',', $paramBag['entityIds'])."]) %} {% set title = "'.$paramBag['title'].'" %} {% include [currentTheme ~ \'/Plugins/EmpireBlockElementsPlugin/views/'.$paramBag['template'].'\', \'@blockElementsPluginViews/'.$paramBag['template'].'\'] ignore missing %}
at line 36
protected mixed|null
getTwigFunction(EventWithResult $event)
at line 46
protected null|array
getAvailableAlgorithms()
in AbstractBlockElementListener at line 245
protected string
getClassName(mixed $class)
Returns short class name