Download the PHP package teamneusta/pimcore-areabrick-config-bundle without Composer
On this page you can find all versions of the php package teamneusta/pimcore-areabrick-config-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download teamneusta/pimcore-areabrick-config-bundle
More information about teamneusta/pimcore-areabrick-config-bundle
Files in teamneusta/pimcore-areabrick-config-bundle
Package pimcore-areabrick-config-bundle
Short Description Object-oriented editable dialog box configuration building for areabricks
License MIT
Informations about the package pimcore-areabrick-config-bundle
Areabrick Config Bundle
Object-oriented editable dialog box configuration building for Areabricks.
Installation
-
Require the bundle
-
Enable the bundle
Add the Bundle to your
config/bundles.php:
Usage
This bundle allows you to create Areabrick configuration dialogs in an object-oriented way.
1. Prepare Areabrick Class
Your Areabrick class must implement the Pimcore\Extension\Document\Areabrick\EditableDialogBoxInterface interface
and use the Neusta\Pimcore\AreabrickConfigBundle\HasDialogBox trait.
Then, implement the buildDialogBox() method to define the dialog.
2. Access in Twig Template
The configured values can be retrieved via the Pimcore editables in the template as usual:
Features
Dialog Configuration
You can customize the size of the dialog and specify whether the page should be reloaded after closing.
Layout Options
Simple Content
For simple dialogs you can use addContent:
Tabs
If you want to organize your fields into multiple tabs, use addTab:
[!IMPORTANT] You cannot mix
addTabandaddContentin the same dialog.
Available Editables
The DialogBoxBuilder provides various methods for creating editables:
Input
A simple text input field.
Checkbox
A simple checkbox to toggle a boolean value.
Select
A dropdown selection field.
Relation
Allows the selection of objects, assets, or documents.
Link
A field for selecting internal or external links.
Numeric
An input field for numbers with min/max validation.
Date
A date picker.
Custom Configuration
All editables allow setting arbitrary configuration values via the addConfig method.
This is useful for passing additional parameters that are not covered by the dedicated methods:
DialogBoxConfigurator
The DialogBoxConfigurator allows you to customize the dialog box configuration dynamically.
This is particularly useful if an Areabrick is used within another Areabrick
and you want to adjust settings like default values or select options based on the context.
1. Create a Configurator Class
Implement the Neusta\Pimcore\AreabrickConfigBundle\DialogBoxConfigurator interface:
[!IMPORTANT] The configurator class must be registered as a
publicservice in your container.
2. Usage in Twig
You can pass the service ID of your configurator via the dialogBoxConfigurator parameter
in the pimcore_area or pimcore_areablock helpers.
[!TIP] If the service ID matches the FQCN, you can simply use the FQCN.
Configuration
Currently, there is no configuration available.
Contribution
Feel free to open issues for any bug, feature request, or other ideas.
[!NOTE] This bundle does not yet cover all of Pimcore’s possibilities and will be expanded as needed. Pull Requests are welcome!
Please remember to create an issue before creating large pull requests.
Local Development
To develop on your local machine, instance identification for Pimcore 12 is needed.
Copy the compose.override.yaml.dist file to compose.override.yaml:
And replace all replace_with_secret values with your data.
Then install the dependencies:
We use composer scripts for our main quality tools. They can be executed via the bin/composer file as well.
For the tests there is a different script that includes a database setup.
All versions of pimcore-areabrick-config-bundle with dependencies
doctrine/dbal Version ^3.9 || ^4.0
pimcore/pimcore Version ^11.5 || ^12.0
symfony/config Version ^6.4 || ^7.4
symfony/dependency-injection Version ^6.4 || ^7.4
symfony/http-foundation Version ^6.4 || ^7.4
symfony/http-kernel Version ^6.4 || ^7.4
symfony/routing Version ^6.4 || ^7.4
symfony/translation Version ^6.4 || ^7.4
symfony/translation-contracts Version ^2.5 || ^3.0
teamneusta/converter-bundle Version ^1.6
twig/twig Version ^3.21.1