fixed some issues caused by c&ping from opencase_entities
This commit is contained in:
@ -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'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user