redirect to home after deleting case or actor

also changed contextual menu code for cases when the actor whose case it is has been deleted
This commit is contained in:
naomi
2018-07-18 22:15:45 +02:00
parent ddab3e450a
commit 33feac1977
2 changed files with 18 additions and 1 deletions

View File

@ -101,7 +101,8 @@ class ContextualMenu extends BlockBase {
private function casePage() {
$case = \Drupal::routeMatch()->getParameter('oc_case');
$actor_id = \Drupal::service('user.private_tempstore')->get('opencase')->get('actor_id');
if ($actor_id) {
$actor = \Drupal::entityTypeManager()->getStorage('oc_actor')->load($actor_id);
if ($actor) {
$actor = \Drupal::entityTypeManager()->getStorage('oc_actor')->load($actor_id);
$caseListLink = $this->getCaseListLink($actor);
} else {