From shopware-data
Comprehensive reference for Shopware 6 Data Abstraction Layer (DAL). Covers Entity, EntityDefinition, EntityCollection, EntityRepository, all Field types, Flags, Associations, Search/Criteria with Filters/Sorting/Aggregations, Write system with Events, Indexing, Versioning, EntityExtension, EntityProtection, Pricing, and PHP Attribute-based definitions. Includes real-world examples from Product, Category, and Media entities.
How this skill is triggered — by the user, by Claude, or both
Slash command
/shopware-data:adt-shopware-dalThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The DAL is Shopware 6's ORM layer built on top of Doctrine DBAL. It provides entity definitions, typed field collections, a criteria-based search system, event-driven write operations, inheritance, versioning, and translation support.
examples/entity-class.mdexamples/entity-collection.mdexamples/entity-definition.mdexamples/mapping-definition.mdexamples/media-definition.mdexamples/property-group.mdexamples/translation-definition.mdexamples/tree-entity.mdreferences/associations.mdreferences/attribute-definitions.mdreferences/core-classes.mdreferences/entity-protection.mdreferences/field-types.mdreferences/flags.mdreferences/indexing.mdreferences/pricing.mdreferences/search-criteria.mdreferences/versioning.mdreferences/write-system.mdThe DAL is Shopware 6's ORM layer built on top of Doctrine DBAL. It provides entity definitions, typed field collections, a criteria-based search system, event-driven write operations, inheritance, versioning, and translation support.
EntityRepository (CRUD facade)
-> EntityDefinition (schema: fields, associations, flags)
-> Field types (50+ field classes)
-> Flag types (25 flag classes)
-> Association fields (7 types)
-> Search/Criteria (query builder)
-> Filters, Sorting, Aggregations, Queries, Grouping
-> Write system (EntityWriter, WriteCommands, Events)
-> Indexing system (EntityIndexer, incremental + full)
-> Version system (create, merge, clone)
The foundational classes that every entity uses. Covers Entity, EntityCollection, EntityDefinition, EntityRepository, EntityTranslationDefinition, MappingEntityDefinition, EntityExtension, and supporting traits/registries.
All 50+ field classes organized by category: ID/FK fields, scalar fields, date/time fields, string fields, JSON fields, price/commerce fields, enum/serialized fields, tree/hierarchy fields, timestamp fields, audit fields, versioning fields, state machine fields, and non-storage fields.
Field (abstract)
├── IdField [StorageAware]
├── FkField [StorageAware]
│ ├── ParentFkField
│ ├── CreatedByField / UpdatedByField
│ ├── VersionField / ReferenceVersionField
│ └── StateMachineStateField
├── StringField -> EmailField, TimeZoneField
├── LongTextField -> TreePathField
├── IntField -> AutoIncrementField, TreeLevelField, ChildCountField
├── FloatField, BoolField -> LockedField
├── DateField, DateTimeField -> CreatedAtField, UpdatedAtField
├── JsonField -> ListField (-> ManyToManyIdField), ObjectField, CustomFields,
│ PriceField, CalculatedPriceField, CartPriceField, ...
├── BlobField, EnumField, SerializedField, PasswordField, RemoteAddressField
├── TranslatedField [NOT StorageAware]
└── AssociationField -> ManyToOne, OneToMany, ManyToMany, OneToOne,
ParentAssociation, ChildrenAssociation, TranslationsAssociation
25 flag classes that control field behavior: API visibility, validation, deletion cascading, write protection, inheritance, search ranking, and more.
7 association field types for defining entity relationships: ManyToOne, OneToMany, ManyToMany, OneToOne, Parent, Children, and Translations.
The complete query system: Criteria builder with fluent API, 12 filter types, 2 sorting types, 11 aggregation types with result classes, score queries, field grouping, and full-text search infrastructure.
-> references/search-criteria.md
EntityWriter pipeline, write commands (Insert/Update/Delete/Cascade/SetNull/JsonUpdate), validation events, field exceptions, and 16 DAL event types.
EntityIndexer abstract class, EntityIndexerRegistry orchestrator, incremental and full indexing, built-in updaters (ChildCount, Inheritance, ManyToManyId, Tree), message queue integration.
VersionManager for creating/merging/cloning versioned entities, VersionDefinition, VersionCommit, VersionCommitData, audit logging, and cleanup tasks.
Scope-based read/write protection at the entity level, complementing field-level WriteProtected flags.
-> references/entity-protection.md
Multi-currency Price struct, PriceCollection with currency fallback, CashRoundingConfig, PriceRuleEntity for rule-based pricing.
Modern alternative to defineFields() using PHP 8 attributes: #[Entity], #[Field], #[ManyToOne], #[OneToMany], #[ManyToMany], #[Translations], etc.
-> references/attribute-definitions.md
Real-world examples extracted from Shopware Core Content entities:
| Example | Description |
|---|---|
| examples/entity-definition.md | ProductDefinition - complex entity with inheritance, versioning, all association types |
| examples/entity-class.md | ProductEntity and CategoryEntity - typed entity classes with traits |
| examples/entity-collection.md | ProductCollection, CategoryCollection, MediaCollection patterns |
| examples/translation-definition.md | ProductTranslationDefinition and CategoryTranslationDefinition |
| examples/mapping-definition.md | ProductCategoryDefinition - ManyToMany pivot table |
| examples/tree-entity.md | CategoryDefinition - tree structure with path, level, breadcrumb |
| examples/media-definition.md | MediaDefinition - Computed, RestrictDelete, SetNullOnDelete, Runtime fields |
| examples/property-group.md | PropertyGroupDefinition + PropertyGroupOptionDefinition - parent/child with ReverseInherited |
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Searches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
npx claudepluginhub zone1987/claude-a-dev-team --plugin shopware-data