Fixed theme function issue after creating entity, and remove "(Client)" etc from name finally!
This commit is contained in:
parent
436607a305
commit
3586ef5788
@ -40,6 +40,16 @@ function opencase_cases_theme() {
|
|||||||
'render element' => 'content',
|
'render element' => 'content',
|
||||||
'variables' => ['content' => NULL],
|
'variables' => ['content' => NULL],
|
||||||
'file' => 'oc_case.page.inc',
|
'file' => 'oc_case.page.inc',
|
||||||
|
],
|
||||||
|
'oc_actor_case_relation' => [
|
||||||
|
'render element' => 'elements',
|
||||||
|
'file' => 'oc_actor_case_relation.page.inc',
|
||||||
|
'template' => 'oc_actor_case_relation',
|
||||||
|
],
|
||||||
|
'oc_actor_case_relation_content_add_list' => [
|
||||||
|
'render element' => 'content',
|
||||||
|
'variables' => ['content' => NULL],
|
||||||
|
'file' => 'oc_actor_case_relation.page.inc',
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -138,24 +148,6 @@ function opencase_query_oc_activity_access_alter($query) {
|
|||||||
$query->condition('access_filter.actors_involved_target_id', $linked_actor_id);
|
$query->condition('access_filter.actors_involved_target_id', $linked_actor_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Implements hook_theme().
|
|
||||||
*/
|
|
||||||
function opencase_cases_theme() {
|
|
||||||
$theme = [];
|
|
||||||
$theme['oc_actor_case_relation'] = [
|
|
||||||
'render element' => 'elements',
|
|
||||||
'file' => 'oc_actor_case_relation.page.inc',
|
|
||||||
'template' => 'oc_actor_case_relation',
|
|
||||||
];
|
|
||||||
$theme['oc_actor_case_relation_content_add_list'] = [
|
|
||||||
'render element' => 'content',
|
|
||||||
'variables' => ['content' => NULL],
|
|
||||||
'file' => 'oc_actor_case_relation.page.inc',
|
|
||||||
];
|
|
||||||
return $theme;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements hook_theme_suggestions_HOOK().
|
* Implements hook_theme_suggestions_HOOK().
|
||||||
*/
|
*/
|
||||||
|
@ -122,7 +122,6 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
|||||||
if ($this->get('middle_names')->value) $name .= $this->get('middle_names')->value . ' ';
|
if ($this->get('middle_names')->value) $name .= $this->get('middle_names')->value . ' ';
|
||||||
$name .= $this->get('last_name')->value . ' ';
|
$name .= $this->get('last_name')->value . ' ';
|
||||||
}
|
}
|
||||||
$name .= '(' . $this->type->entity->label() . ')';
|
|
||||||
|
|
||||||
$this->setName($name);
|
$this->setName($name);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user