From 33a8b1e0a5e3daa7a04c88210798d97f7f9e3cb4 Mon Sep 17 00:00:00 2001 From: naomi Date: Sat, 14 Apr 2018 16:01:06 +0200 Subject: [PATCH] Added subject field to activity, and made that the label --- modules/zencrm_entities/src/Entity/Activity.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/zencrm_entities/src/Entity/Activity.php b/modules/zencrm_entities/src/Entity/Activity.php index 8ef11d5..cba637a 100644 --- a/modules/zencrm_entities/src/Entity/Activity.php +++ b/modules/zencrm_entities/src/Entity/Activity.php @@ -42,7 +42,7 @@ use Drupal\user\UserInterface; * entity_keys = { * "id" = "id", * "bundle" = "type", - * "label" = "name", + * "label" = "subject", * "uuid" = "uuid", * "uid" = "user_id", * "langcode" = "langcode", @@ -187,9 +187,9 @@ class Activity extends ContentEntityBase implements ActivityInterface { ->setDescription(t('The case this activity belongs to.')) ->setSetting('target_type', 'case_entity'); - $fields['name'] = BaseFieldDefinition::create('string') - ->setLabel(t('Name')) - ->setDescription(t('The name of the Activity.')) + $fields['subject'] = BaseFieldDefinition::create('string') + ->setLabel(t('Subject')) + ->setDescription(t('The purpose of the Activity.')) ->setSettings([ 'max_length' => 50, 'text_processing' => 0, @@ -204,8 +204,6 @@ class Activity extends ContentEntityBase implements ActivityInterface { 'type' => 'string_textfield', 'weight' => -4, ]) - ->setDisplayConfigurable('form', TRUE) - ->setDisplayConfigurable('view', TRUE) ->setRequired(TRUE); $fields['status'] = BaseFieldDefinition::create('boolean')