diff --git a/src/Plugin/Block/InvolvedParties.php b/src/Plugin/Block/InvolvedParties.php new file mode 100644 index 0000000..be835e0 --- /dev/null +++ b/src/Plugin/Block/InvolvedParties.php @@ -0,0 +1,40 @@ +getParameter('case_entity')->id(); + $markup = ""; + + $case = $entity = \Drupal::entityTypeManager()->getStorage('case_entity')->load($case_id); + $hats_involved = $case->hats_involved->referencedEntities(); + foreach($hats_involved as $hat) { + $person_id = $hat->person->first()->getValue()['target_id']; + $markup .= "

" . $hat->name->getString() . "

"; + } + return [ + '#cache' => [ + 'max-age' => 0, + ], + '#markup' => "" + ]; + + } + +}