SpecialOfferBlockElementsListener
class SpecialOfferBlockElementsListener extends AbstractBlockElementListener
Class SpecialOfferBlockElementsListener
Properties
| protected SpecialOfferManager | $manager | ||
| 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 %}
Returns function name that will be used in @blockElementsPluginViews/block/block-content.html.twig Example: return 'block_example_extension'
Returns list of all available algorithms with their params or null if they do not exists
Returns array [$key => $value], where $key can be searchRouteName, searchField, algorithm, algorithmName
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 22
protected mixed|null
getTwigFunction(EventWithResult $event)
Returns function name that will be used in @blockElementsPluginViews/block/block-content.html.twig Example: return 'block_example_extension'
at line 34
protected null|array
getAvailableAlgorithms()
Returns list of all available algorithms with their params or null if they do not exists
in AbstractBlockElementListener at line 245
protected string
getClassName(mixed $class)
Returns short class name
in AbstractBlockElementListener at line 258
protected array
proceedResultDataParams()
Returns array [$key => $value], where $key can be searchRouteName, searchField, algorithm, algorithmName