Mapped Superclasses and Extensibility (Developers)


What it is

v1.2.0 refactors core DegDitor entities to use Doctrine mapped superclasses, separating shared mapping/behavior from concrete entity classes.

When to use it

Use this architecture when customizing DegDitor models in host applications or plugins.
Typical cases:
  • extending entities with project-specific fields,
  • replacing model classes while preserving existing contracts,
  • evolving custom repositories/forms around extended entities.

How it works

Core mapped superclasses:
  • BlockMappedSuperclass
  • BlockTranslationMappedSuperclass
  • CategoryMappedSuperclass
  • CategoryTranslationMappedSuperclass
  • ImageMappedSuperclass
  • ImageTranslationMappedSuperclass
  • PageMappedSuperclass
  • PageTranslationMappedSuperclass
Concrete default entities (Page, Category, Block, etc.) now extend these classes.
This preserves runtime behavior while providing cleaner inheritance points.

How to configure/use

Example: replace page model

1<?php 2 3namespace App\Entity\DegDitor; 4 5use Doctrine\ORM\Mapping as ORM; 6use FiftyDeg\SyliusDegditorBasePlugin\Entity\PageInterface; 7use FiftyDeg\SyliusDegditorBasePlugin\Entity\PageMappedSuperclass; 8 9#[ORM\Entity] 10#[ORM\Table(name: 'app_degditor_page')] 11class Page extends PageMappedSuperclass implements PageInterface 12{ 13} 14

Bind model in resource configuration

1sylius_resource: 2 resources: 3 fifty_deg.sylius_degditor_base_plugin.entity.page: 4 classes: 5 model: App\Entity\DegDitor\Page 6

Compatibility checklist when overriding

  • Keep implemented interface (PageInterface, etc.).
  • Confirm table mapping strategy and migration impact.
  • Review linked resource bindings (form/repository/translation classes) for consistency.
  • Revalidate serializers and API metadata if class paths change.

Common issues

Entity override compiles but runtime resources fail

  • Usually incomplete sylius_resource class wiring.
  • Check model + translation + repository alignment.

Migration conflicts after override

  • Verify table names and inheritance strategy.
  • Regenerate and review migrations in host app context.

API serialization regressions

  • Confirm serializer metadata targets resolved model class and groups.
  • Confirm normalizers still support the resolved interfaces/classes.

Related docs

Your next step

Bring DegDitor to your Sylius store

Try the plugin

Experience the best features at no cost

Get a better understanding of DegDitor and how it works

Test it risk-free and see the results

Try it

Get a demo

Get a personalized demo tailored to your unique needs

Discover how reusable blocks speed up content creation

Evaluate DegDitor against your requirements

Get a demo

Find the right fit for your store

Tell us about your Sylius store and content needs. Talk to sales to explore the right DegDitor license, discuss integration, and plan your next steps.

Talk to sales