Skip to main content
Version: 2026.1

How to Add a Custom Object Datatype

Overview​

This example adds a custom simpleText data object field type to Pimcore Studio. Custom datatypes appear in the class definition editor's field type dropdown and render as editable fields in the data object editor and grid.

Files Overview​

LayerFilePurpose
CoreSimpleText.phpField definition class
Coreconfig.yamlField type registration
GDIgeneric-data-index.yamlSearch index adapter
Studio Backendstudio_backend.yamlData adapter mapping
Studio BackendSimpleTextDefinition.phpGrid column definition
Studio BackendPimcoreStudioExampleExtension.phpConfig loading
Studio Backendservices.yamlService registrations
Studio UIdynamic-type-object-data-simple-text.tsxObject editor + grid
Studio UIdynamic-type-field-definition-simple-text.tsxClass editor
Studio UIsimple-text-datatype-module.tsxRegistry registration
Studio UIindex.tsPlugin entry point
Studio UIplugins.tsPlugin export

Details​

Adding a custom object datatype requires registration across four layers:

Pimcore Core:

  • A field definition class extending Pimcore\Model\DataObject\ClassDefinition\Data
  • Registration via pimcore.objects.class_definitions.data.map

Generic Data Index:

  • A field definition adapter tagged with pimcore.generic_data_index.data-object.search_index_field_definition for search index support (reuses TextKeywordAdapter for text fields)

Studio Backend:

  • A data adapter mapping via pimcore_studio_backend.data_object_data_adapter_mapping for save/load (reuses StringAdapter for text fields)
  • A ColumnDefinitionInterface tagged with pimcore.studio_backend.grid_column_definition for data object grid column and filter support

Studio UI (Frontend):

  • A DynamicTypeObjectDataAbstractInput subclass for the data object editor and grid, with dynamicTypeFieldFilterType set for grid filter support
  • A DynamicTypeFieldDefinitionDataAbstract subclass for the class definition editor
  • Registration of both types via a module and plugin

The example implements simpleText as a simple text input, demonstrating the full pattern without additional complexity.

For the step-by-step guide, see Adding Object Datatypes in the Pimcore core documentation.