Class DeleteHandler handles the delete action.

It provides a setEnvironment method which has to be used to initialize the environment instead.

 Methods

Delete an model.

delete(\ContaoCommunityAlliance\DcGeneral\Data\ModelIdInterface $modelId) : void

{@inheritdoc}

process() 

Delete all children.

deleteChildren() : void

Fetch the model.

fetchModel(\ContaoCommunityAlliance\DcGeneral\Data\ModelIdInterface $modelId) : \ContaoCommunityAlliance\DcGeneral\Data\ModelInterface

Check if is it allowed to delete a record.

guardIsDeletable(\ContaoCommunityAlliance\DcGeneral\Data\ModelIdInterface $modelId, bool $redirect) : void

Parameters

$redirect

bool

If true it redirects to error page instead of throwing an exception.

Exceptions

\ContaoCommunityAlliance\DcGeneral\Contao\View\Contao2BackendView\Exception\NotDeletableException If deletion is disabled.