new DAL\
LongTextField('content', 'content'
))->
addFlags(new DAL\Flag\
AllowHtml()),
new DAL\
BoolField('display', 'display'
),
],
'product' =>
[ (new ManyToManyAssociationField('customEntityBlogProducts', 'custom_entity_blog', 'custom_entity_blog_products', 'product_id', 'custom_entity_blog_id', 'id', 'id'
))->
addFlags(new DAL\Flag\
CascadeDelete(),
new Extension()),
(new DAL\
OneToOneAssociationField('customEntityBlogLinkProductRestrict', 'id', 'link_product_restrict_id', 'custom_entity_blog'
))->
addFlags(new DAL\Flag\
RestrictDelete(),
new Extension()),
(new DAL\
OneToOneAssociationField('customEntityBlogLinkProductCascade', 'id', 'link_product_cascade_id', 'custom_entity_blog'
))->
addFlags(new DAL\Flag\
CascadeDelete(),
new Extension()),
(new DAL\
OneToOneAssociationField('customEntityBlogLinkProductSetNull', 'id', 'link_product_set_null_id', 'custom_entity_blog'
))->
addFlags(new DAL\Flag\
SetNullOnDelete(),
new Extension()),
(new OneToManyAssociationField('customEntityBlogTopSellerCascade', 'custom_entity_blog', 'top_seller_cascade_id'
))->
addFlags(new DAL\Flag\
CascadeDelete(),
new Extension()),
(new OneToManyAssociationField('customEntityBlogTopSellerRestrict', 'custom_entity_blog', 'top_seller_restrict_id'
))->
addFlags(new DAL\Flag\
RestrictDelete(),
new Extension()),
(new OneToManyAssociationField('customEntityBlogTopSellerSetNull', 'custom_entity_blog', 'top_seller_set_null_id'
))->
addFlags(new DAL\Flag\
SetNullOnDelete(),
new Extension()),
(new ManyToManyAssociationField('customEntityBlogInheritedProducts', 'custom_entity_blog', 'custom_entity_blog_inherited_products', 'product_id', 'custom_entity_blog_id', 'id', 'id'
))->
addFlags(new DAL\Flag\
CascadeDelete(),
new Extension(),
new DAL\Flag\
Inherited()),
(new OneToManyAssociationField('customEntityBlogInheritedTopSeller', 'custom_entity_blog', 'inherited_top_seller_id'
))->
addFlags(new DAL\Flag\
SetNullOnDelete(),
new DAL\Flag\
Inherited(),
new Extension()),
],
];
foreach ($expected as $entity =>
$properties) { $definition =
$container ->
get(DefinitionInstanceRegistry::
class) ->
getByEntityName($entity);
foreach ($properties as $field) { $field->
compile($container->
get(DefinitionInstanceRegistry::
class));