diff --git a/content_entity_example/src/Entity/Contact.php b/content_entity_example/src/Entity/Contact.php index 91747f9..3c40cfd 100644 --- a/content_entity_example/src/Entity/Contact.php +++ b/content_entity_example/src/Entity/Contact.php @@ -1,8 +1,4 @@ setDisplayConfigurable('form', TRUE) ->setDisplayConfigurable('view', TRUE); - /** - * Role field for the contact. - * The values shown in options are 'administrator' and 'user'. - */ - + // Role field for the contact. + // The values shown in options are 'administrator' and 'user'. $fields['role'] = BaseFieldDefinition::create('list_string') ->setLabel(t('Role')) ->setDescription(t('The role of the Contact entity.')) ->setSettings(array( - 'allowed_values' => array( - 'administrator' => 'administrator', - 'user' => 'user', - ), + 'allowed_values' => array( + 'administrator' => 'administrator', + 'user' => 'user', + ), )) // Set the default value of this field to 'user'. ->setDefaultValue('user') ->setDisplayOptions('view', array( - 'label' => 'above', - 'type' => 'string', - 'weight' => -2, + 'label' => 'above', + 'type' => 'string', + 'weight' => -2, )) ->setDisplayOptions('form', array( - 'type' => 'options_select', - 'weight' => -2, + 'type' => 'options_select', + 'weight' => -2, )) ->setDisplayConfigurable('form', TRUE) ->setDisplayConfigurable('view', TRUE); diff --git a/content_entity_example/src/Entity/Controller/ContactListBuilder.php b/content_entity_example/src/Entity/Controller/ContactListBuilder.php index e2969d7..2f6ffae 100644 --- a/content_entity_example/src/Entity/Controller/ContactListBuilder.php +++ b/content_entity_example/src/Entity/Controller/ContactListBuilder.php @@ -1,10 +1,5 @@ urlGenerator = $url_generator; } - /** * {@inheritdoc} * diff --git a/content_entity_example/src/Tests/ContentEntityExampleTest.php b/content_entity_example/src/Tests/ContentEntityExampleTest.php index cf36566..441ea42 100644 --- a/content_entity_example/src/Tests/ContentEntityExampleTest.php +++ b/content_entity_example/src/Tests/ContentEntityExampleTest.php @@ -1,10 +1,5 @@