Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
DalExtension example
AssociationField::RESTRICT =>
new
RestrictDelete
(
)
,
default
=>
throw
new
\
RuntimeException
(
\
sprintf
(
'onDelete property %s are not supported on field %s',
$field
[
'onDelete'
]
,
$field
[
'name'
]
)
)
,
}
;
}
private
static
function
getExtension
(
EntityDefinition
$reference
)
: ?DalExtension
{
if
(
str_starts_with
(
$reference
->
getEntityName
(
)
, 'custom_entity_'
)
||
str_starts_with
(
$reference
->
getEntityName
(
)
, 'ce_'
)
)
{
return
null;
}
return
new
DalExtension
(
)
;
}
}