fixed some issues caused by c&ping from opencase_entities

This commit is contained in:
2021-02-18 12:02:25 +00:00
parent 0f0281c58c
commit bc98ecb541
27 changed files with 89 additions and 90 deletions

View File

@ -35,14 +35,13 @@ function opencase_cases_theme() {
'render element' => 'elements',
'file' => 'oc_case.page.inc',
'template' => 'oc_case',
]
],
'oc_case_content_add_list' => [
'render element' => 'content',
'variables' => ['content' => NULL],
'file' => 'oc_case.page.inc',
]
];
];
}
function opencase_cases_entity_base_field_info($entity_type) {
@ -50,7 +49,7 @@ function opencase_cases_entity_base_field_info($entity_type) {
// Add Case field to Activity
if ($entity_type->id() === 'oc_activity') {
$fields['oc_case'] = BaseFieldDefinition::create('entity_reference')
$fields['oc_case'] = \Drupal\Core\Field\BaseFieldDefinition::create('entity_reference')
->setLabel(t('Case'))
->setDescription(t('The case this activity belongs to.'))
->setSetting('target_type', 'oc_case')
@ -70,7 +69,7 @@ function opencase_cases_entity_base_field_info($entity_type) {
/**
* When creating an activity, it sets the case id from the URL.
*/
public static function opencase_cases_default_activity_case_value() {
function opencase_cases_default_activity_case_value() {
return array(\Drupal::request()->query->get('case_id'));
}