Refactored case-type - client-type relationship

and corresponding part of widget
This commit is contained in:
naomi
2018-06-13 13:31:04 +02:00
parent 74b6f90c94
commit e601fde1ef
4 changed files with 37 additions and 95 deletions

View File

@ -188,7 +188,7 @@ class ContextualMenu extends BlockBase {
*/
private function generateLinksForAddingNewCases($actor, $title, $query = []) {
$actor_type = $actor->bundle();
$allowedChildBundles = EntityTypeRelations::getAllowedChildBundles('oc_actor', $actor_type);
$allowedChildBundles = EntityTypeRelations::getAllowedCaseTypesForActorType($actor_type);
$title = t($title);
$markup = "<h1>$title: </h1>";
foreach($allowedChildBundles as $machine_name => $label) {