Creating Custom Widgets
Adding a custom widget type requires four components:
ConfigRepositoryInterface(PHP) - persists and retrieves widget configuration via YAML storageConfigHydratorInterface(PHP) - maps raw config arrays to typed DTOs for the API layerDataResolverInterface(PHP) - fetches the data the widget displays at runtimeDynamicTypeWidgetTypeDefinitionAbstract(TypeScript) - controls rendering, slot rules, and the configuration form in Pimcore Studio
Tag the PHP classes with the appropriate service tags, register the type identifier in
pimcore_studio_dashboards.widget_types, and bind the TypeScript class into the Studio UI
dependency injection container. The sub-pages below use a top_assets widget as a running example.