Extbase controllers
New in version 0.7.0
In order to increase compatibility with standard extbase plugins,
the extension supports the rendering of extbase controller actions.
For this purpose, a compatibility layer was introduced, with which
own Data can be triggered using the Handlebars.
Configuration
Tag each Data with handlebars. within
your Services. file and provide additional information
about the target extbase controller and actions supported by it.
# Configuration/Services.yaml
services:
Vendor\Extension\DataProcessing\MyProcessor:
tags:
- name: handlebars.processor
- name: handlebars.compatibility_layer
type: 'extbase_controller'
controller: 'Vendor\Extension\Controller\MyController'
actions: 'dummy'
The action configuration can be either empty (= NULL) or set
to a comma-separated list of action names that are supported by the
configured Data. If you leave it empty, the Data
is used for all controller actions.
Important
Only Data that are additionally tagged with
handlebars. are respected as component for additional
compatibility layers.
Usage
Once the Handlebars is triggered to render
a specific "view", it creates an array of information and passes
it to the configured Data. You can then take further
steps based on the provided configuration.
When accessing the $configuration property inside your
Data, you should see the following properties:
$configuration = [
'extbaseViewConfiguration' => [
'controller' => '<controller class>',
'action' => '<controller action>',
'request' => '<original extbase request>',
'variables' => '<template variables>',
],
];
Sources
See also
View the sources on GitHub: