Code:
if ($this->isPost())
{
$entity->delete();
return $this->redirect($returnUrl);
}
else
{
$viewParams = [
'content' => $entity,
'confirmUrl' => $confirmUrl,
'contentUrl' => $contentUrl,
'contentTitle' => $contentTitle
] + $params;
return $this->view('XF:Delete\Delete', $template ?: 'public:delete_confirm', $viewParams);
}
Very nice to show a basket, click it, get a message, confirm and delete $entity.
But i need to delete much more in other tables.
Should i use
$returnUrl
to do the rest?