Skip to content

Flags Reference

ClassnameDescription
AllowEmptyStringFlag a text column that an empty string should not be considered as null
AllowHtmlIn case a column is allowed to contain HTML-esque data. Beware of injection possibilities
ApiAwareMakes a field available in the Store or Admin API. If no parameter is passed for the flag, the field will be exposed in the both Store and Admin API. By default, all fields are enabled for the Admin API, as the flag is added in the base Field class. However, the scope can be restricted to AdminApiSource and SalesChannelApiSource.
CascadeDeleteIn case the referenced association data will be deleted, the related data will be deleted too
ComputedThe value is computed by indexer or external systems and cannot be written using the DAL.
DeprecatedThis flag is used to mark the field that has been deprecated and will be removed with the next major version.
ExtensionDefines that the data of this field is stored in an Entity::$extension and are not part of the struct itself.
InheritedDefines that the data of this field can be inherited by the parent record
PrimaryKeyThe PrimaryKey flag defines the field as part of the entity's primary key. Usually, this should be the ID field.
RequiredFields marked as "Required" must be specified during the create request of an entity. This configuration is only taken into account during the write process.
RestrictDeleteAssociated data with this flag, restricts the delete of the entity in case that a record with the primary key exists.
ReverseInheritedFlags "ReverseInherited"
RuntimeDefines that the data of the field will be loaded at runtime by an event subscriber or other class. Used in entity extensions for plugins or not directly fetchable associations.
SearchRankingDefines the weight for a search query on the entity for this field
SetNullOnDeleteIn case the referenced association data will be deleted, the related data will be set to null and an Written event will be thrown
SinceThe "Since" flag defines since which Shopware version the field is available.
WriteProtectedBy setting the "WriteProtected" flag, write access via API can be restricted. This flag is mostly used to protect indexed data from direct writing via API.