BaseBlockElementListenerInterface
interface BaseBlockElementListenerInterface
Interface BaseBlockElementListenerInterface. This is base interface defining all methods custom listeners should implement
Methods
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'
Return content of twig file. This content should contain call to extension and include template to be rendered.
Details
at line 35
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
at line 45
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'
at line 53
EventWithResult
getAlgorithms(EventWithResult $event)
Return array of available algorithms
at line 61
EventWithResult
getAlgorithmParams(EventWithResult $event)
Return array of params for selected algorithm
at line 75
EventWithResult
getTwigContent(EventWithResult $event)
Return content of twig file. This content should contain call to extension and include template to be rendered.
Example: $content = "{% set data = alligator_get_static_pages_by_id([".implode(',', $paramBag['entityIds'])."]) %}"; $content.= '{% set title = "'.$paramBag['title'].'" %}'; $content.= '{% include [currentTheme ~ \'/Plugins/EmpireBlockElementsPlugin/views/'.$paramBag['template'].'\', \'@blockElementsPluginViews/'.$paramBag['template'].'\'] ignore missing %}';