Skip to content
Snippets Groups Projects
Commit b35f7db4 authored by John Voskuilen's avatar John Voskuilen
Browse files

Issue #3513033 by spiderman: Too few arguments to function WorkflowEntityHooks::userDelete()

parent a43fdcb4
No related branches found
No related tags found
No related merge requests found
Pipeline #448792 passed with warnings
......@@ -7,7 +7,7 @@ use Drupal\Core\Entity\EntityInterface;
/**
* Provides a wrapper/ decorator for the $transition->getTargetEntity().
*
* @todo Change all sttaic functions to non static.
* @todo Change all static functions to non static.
* But a decorator requires duplciating many functions...
*/
class WorkflowTargetEntity {
......
......@@ -115,7 +115,11 @@ class WorkflowEntityHooks {
}
break;
case !WorkflowTargetEntity::isWorkflowEntityType($entity->getEntityTypeId()):
case WorkflowTargetEntity::isWorkflowEntityType($entity->getEntityTypeId()):
// A Workflow entity.
break;
default:
// A 'normal' entity is deleted.
foreach ($fields = _workflow_info_fields($entity) as $field_id => $field_storage) {
$field_name = $field_storage->getName();
......@@ -124,10 +128,6 @@ class WorkflowEntityHooks {
$this->deleteTransitionsOfEntity($entity, 'workflow_transition', $field_name);
}
break;
default:
// A Workflow entity.
break;
}
}
......@@ -222,7 +222,7 @@ class WorkflowEntityHooks {
* @todo Hook hook_user_delete does not exist. hook_ENTITY_TYPE_delete?
*/
#[Hook('user_delete')]
public function userDelete($edit, AccountInterface $account, $method) {
public function userDelete($account) {
$this->userCancel([], $account, 'user_cancel_delete');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment