diff --git a/src/Plugin/Block/CaseDetails.php b/src/Plugin/Block/CaseDetails.php new file mode 100644 index 0000000..c7430b7 --- /dev/null +++ b/src/Plugin/Block/CaseDetails.php @@ -0,0 +1,58 @@ +getParameter('case_entity')->id(); + $case = $entity = \Drupal::entityTypeManager()->getStorage('case_entity')->load($case_id); + $markup .= $this->renderInvolvedParties($case); + $markup .= $this->renderEntity($case); + $markup .= $this->renderEditLink($case_id); + return [ + '#cache' => [ + 'max-age' => 0, + ], + '#markup' => $markup + ]; + + } + + private function renderEditLink($case_id) { + return "
"; + } + + private function renderEntity($case) { + $view_builder = \Drupal::entityTypeManager()->getViewBuilder('case_entity'); + $build = $view_builder->view($case, 'default'); + return render($build); + } + + private function renderInvolvedParties($case) { + $markup = "" . $hat->name->getString() . "
"; + } + return "" . $hat->name->getString() . "
"; - } - return [ - '#cache' => [ - 'max-age' => 0, - ], - '#markup' => "