Skip to main content
Version: Next

Creating Custom Widgets

Adding a custom widget type requires four components:

  1. ConfigRepositoryInterface (PHP) - persists and retrieves widget configuration via YAML storage
  2. ConfigHydratorInterface (PHP) - maps raw config arrays to typed DTOs for the API layer
  3. DataResolverInterface (PHP) - fetches the data the widget displays at runtime
  4. DynamicTypeWidgetTypeDefinitionAbstract (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.

Further Reading