diff --git a/modules/zencrm_entities/src/Entity/CaseEntity.php b/modules/zencrm_entities/src/Entity/CaseEntity.php index 982b6d5..bad6bea 100644 --- a/modules/zencrm_entities/src/Entity/CaseEntity.php +++ b/modules/zencrm_entities/src/Entity/CaseEntity.php @@ -161,24 +161,22 @@ class CaseEntity extends ContentEntityBase implements CaseEntityInterface { ->setRevisionable(TRUE) ->setSetting('target_type', 'user') ->setSetting('handler', 'default') - ->setTranslatable(TRUE) - ->setDisplayOptions('view', [ - 'label' => 'hidden', - 'type' => 'author', - 'weight' => 0, - ]) - ->setDisplayOptions('form', [ - 'type' => 'entity_reference_autocomplete', - 'weight' => 5, - 'settings' => [ - 'match_operator' => 'CONTAINS', - 'size' => '60', - 'autocomplete_type' => 'tags', - 'placeholder' => '', - ], - ]) - ->setDisplayConfigurable('form', TRUE) - ->setDisplayConfigurable('view', TRUE); + # ->setDisplayOptions('view', [ + # 'label' => 'hidden', + # 'type' => 'author', + # 'weight' => 0, + # ]) + # ->setDisplayOptions('form', [ + # 'type' => 'entity_reference_autocomplete', + # 'weight' => 5, + # 'settings' => [ + # 'match_operator' => 'CONTAINS', + # 'size' => '60', + # 'autocomplete_type' => 'tags', + # 'placeholder' => '', + # ], + # ]) + ->setTranslatable(TRUE); $fields['name'] = BaseFieldDefinition::create('string') ->setLabel(t('Name')) @@ -197,8 +195,6 @@ class CaseEntity extends ContentEntityBase implements CaseEntityInterface { 'type' => 'string_textfield', 'weight' => -4, ]) - ->setDisplayConfigurable('form', TRUE) - ->setDisplayConfigurable('view', TRUE) ->setRequired(TRUE); @@ -229,11 +225,11 @@ class CaseEntity extends ContentEntityBase implements CaseEntityInterface { $fields['status'] = BaseFieldDefinition::create('boolean') ->setLabel(t('Publishing status')) ->setDescription(t('A boolean indicating whether the Case entity is published.')) - ->setDefaultValue(TRUE) - ->setDisplayOptions('form', [ - 'type' => 'boolean_checkbox', - 'weight' => -3, - ]); +# ->setDisplayOptions('form', [ +# 'type' => 'boolean_checkbox', +# 'weight' => -3, +# ]) + ->setDefaultValue(TRUE); $fields['created'] = BaseFieldDefinition::create('created') ->setLabel(t('Created')) diff --git a/src/Plugin/Block/PersonPanel.php b/src/Plugin/Block/PersonPanel.php index 47ecd63..d67b2b7 100644 --- a/src/Plugin/Block/PersonPanel.php +++ b/src/Plugin/Block/PersonPanel.php @@ -54,7 +54,7 @@ class PersonPanel extends BlockBase { // they have hats, so display the case view for each hat. foreach($hats as $hat) { $markup .= $this->showCases($hat); - $markup .= $this->showCaseCreationLinks($hat); + $markup .= $this->showCaseCreationLinks($hat, $person_id); } } } @@ -77,12 +77,12 @@ class PersonPanel extends BlockBase { } // Provides links to create different types of cases, passing in the hat id. - private function showCaseCreationLinks($hat) { + private function showCaseCreationLinks($hat, $person_id) { $hat_id = $hat->id(); $case_types = \Drupal::service('entity_type.bundle.info')->getBundleInfo('case_entity'); foreach($case_types as $case_type_id => $type) { $label = $type['label']; - $markup .= "
"; + $markup .= ""; } return "