Skip to main content
Version: 2024.2

Extending Adapters

The bundle already implements some adapters for special data types (e.g. objectbrick to keep only specific fields). You can override the core adapters (e.g. input or numeric) with your own classes and add custom ones when needed.

The configuration is a simple key-value map in your config/config.yaml file using the key pimcore_backend_power_tools.pimcore_alternative_object_trees.adapters. For example:

pimcore_backend_power_tools:
pimcore_alternative_object_trees:
adapters:
input:
frontend: SimpleValueAdapter
backend: App\Adapter\AlternativeElementTree\CustomValueAdapter #= the custom backend adapter
custom:
frontend: FooAdapter #= the custom frontend adapter
backend: Pimcore\Bundle\BackendPowerToolsBundle\Adapter\AlternativeElementTree\SimpleValueAdapter

You can read more about adding the Custom Frontend Adapter and Custom Backend Adapter.