Download the PHP package pimcore/output-data-config-toolkit-bundle without Composer
On this page you can find all versions of the php package pimcore/output-data-config-toolkit-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package output-data-config-toolkit-bundle
OutputDataConfigToolkit
This toolkit provides an user interface to create output formats for data objects based on different output channels. So it is possible to define, which attributes of a data objects should be printed in a certain output channel. An output data configuration consists of
- values = data object attributes
- operators = can combine, modify, calculate, ... values
Table of Contents
- Configuration
- Defining output data configuration for different output channels
- Working with output channels in code
- Events
- Adding new operators
- Defining output data configuration programmatically
- Migration from Pimcore 4
Configuration
Channel Config
After installing the bundle, a config file is located at config/pimcore/outputdataconfig/config.php
. In this config file available output channels can be configured as follows:
Functional Config
In config.yml
:
Read more about the classification store display modes.
Defining output data configuration for different output channels
Output data configurations can be configured in an additional tab in the data object editor. There for each data object class and output channel an output output data configuration can be defined.
The output data configurations can be inherited along the data objects tree. The column Object ID shows from with data object the output data configuration is inherited from. By clicking overwrite, the editor opens and a new output data configuration can be configured.
Working with output channels in code
The bundle provides a service class, with converts a Pimcore data object to an output data structure based on its ouput data configuration.
A sample template helper see doc/ProductListSpecification.php
, the needed service configuration:
Events
Event | Description |
---|---|
outputDataConfigToolkit.initialize |
Before any output-config tab's initialization, so you can i.e. manipulate the configuration object, or only show the tab for a specific class type. For a full example see OutputDataConfigToolkitListener. |
outputDataConfigToolkit.saveEvent |
Before a specific output config is saved. Can be implemented to sort config attributes or to modify attributes in any other way. |
Adding new operators
Create a Pimcore bundle and add following files:
php implementation of operator
- must be in namespace
OutputDataConfigToolkitBundle\ConfigElement\Operator
- must implement
AbstractOperator
java script implementation of operator
- must be in namespace
pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.operator
- must extend
pimcore.bundle.outputDataConfigToolkit.outputDataConfigElements.Abstract
Defining output data configuration programmatically
For defining definitions programmatically utilize the \OutputDataConfigToolkitBundle\ConfigAttribute\...
classes.
I.e. adding a classification store key to a channel definition:
Support for textual class ids
Execute the following statement:
Migration from Pimcore 4
-
Change table name from
plugin_outputdataconfigtoolkit_outputdefinition
tobundle_outputdataconfigtoolkit_outputdefinition
. - Change namespace from
Elements\OutputDataConfigToolkit
toOutputDataConfigToolkitBundle
. - Removed key value support.
-
Changed permission key to
bundle_outputDataConfigToolkit
, execute following SQL statement - namespaces for custom operators and values changed from
pimcore.plugin.outputDataConfigToolkit.*
topimcore.bundle.outputDataConfigToolkit.*
All versions of output-data-config-toolkit-bundle with dependencies
symfony/config Version ^6.2
symfony/dependency-injection Version ^6.2
symfony/event-dispatcher Version ^6.2
symfony/event-dispatcher-contracts Version ^3.0
symfony/http-foundation Version ^6.2
symfony/http-kernel Version ^6.2
symfony/routing Version ^6.2
symfony/templating Version ^6.2