Removed all fields from Person in default view mode
This commit is contained in:
parent
3d8c7f6ca1
commit
c47ce313b3
@ -191,21 +191,21 @@ class Person extends RevisionableContentEntityBase implements PersonInterface {
|
|||||||
->setRevisionable(TRUE)
|
->setRevisionable(TRUE)
|
||||||
->setSetting('target_type', 'user')
|
->setSetting('target_type', 'user')
|
||||||
->setSetting('handler', 'default')
|
->setSetting('handler', 'default')
|
||||||
->setDisplayOptions('form', [
|
# ->setDisplayOptions('form', [
|
||||||
'type' => 'entity_reference_autocomplete',
|
# 'type' => 'entity_reference_autocomplete',
|
||||||
'weight' => 5,
|
# 'weight' => 5,
|
||||||
'settings' => [
|
# 'settings' => [
|
||||||
'match_operator' => 'CONTAINS',
|
# 'match_operator' => 'CONTAINS',
|
||||||
'size' => '60',
|
# 'size' => '60',
|
||||||
'autocomplete_type' => 'tags',
|
# 'autocomplete_type' => 'tags',
|
||||||
'placeholder' => '',
|
# 'placeholder' => '',
|
||||||
],
|
# ],
|
||||||
])
|
# ])
|
||||||
->setDisplayOptions('view', [
|
# ->setDisplayOptions('view', [
|
||||||
'label' => 'inline',
|
# 'label' => 'inline',
|
||||||
'type' => 'author',
|
# 'type' => 'author',
|
||||||
'weight' => 100,
|
# 'weight' => 100,
|
||||||
])
|
# ])
|
||||||
->setTranslatable(TRUE);
|
->setTranslatable(TRUE);
|
||||||
|
|
||||||
// This field is computed in a presave hook.
|
// This field is computed in a presave hook.
|
||||||
@ -228,18 +228,11 @@ class Person extends RevisionableContentEntityBase implements PersonInterface {
|
|||||||
'max_length' => 50,
|
'max_length' => 50,
|
||||||
'text_processing' => 0,
|
'text_processing' => 0,
|
||||||
])
|
])
|
||||||
->setDefaultValue('')
|
|
||||||
->setDisplayOptions('view', [
|
|
||||||
'label' => 'above',
|
|
||||||
'type' => 'string',
|
|
||||||
'weight' => -4,
|
|
||||||
])
|
|
||||||
->setDisplayOptions('form', [
|
->setDisplayOptions('form', [
|
||||||
'type' => 'string_textfield',
|
'type' => 'string_textfield',
|
||||||
'weight' => -4,
|
'weight' => -4,
|
||||||
])
|
])
|
||||||
->setDisplayConfigurable('form', TRUE)
|
->setDisplayConfigurable('form', TRUE)
|
||||||
->setDisplayConfigurable('view', TRUE)
|
|
||||||
->setRequired(TRUE);
|
->setRequired(TRUE);
|
||||||
|
|
||||||
$fields['middle_names'] = BaseFieldDefinition::create('string')
|
$fields['middle_names'] = BaseFieldDefinition::create('string')
|
||||||
@ -250,18 +243,11 @@ class Person extends RevisionableContentEntityBase implements PersonInterface {
|
|||||||
'max_length' => 50,
|
'max_length' => 50,
|
||||||
'text_processing' => 0,
|
'text_processing' => 0,
|
||||||
])
|
])
|
||||||
->setDefaultValue('')
|
|
||||||
->setDisplayOptions('view', [
|
|
||||||
'label' => 'above',
|
|
||||||
'type' => 'string',
|
|
||||||
'weight' => -4,
|
|
||||||
])
|
|
||||||
->setDisplayOptions('form', [
|
->setDisplayOptions('form', [
|
||||||
'type' => 'string_textfield',
|
'type' => 'string_textfield',
|
||||||
'weight' => -4,
|
'weight' => -4,
|
||||||
])
|
])
|
||||||
->setDisplayConfigurable('form', TRUE)
|
->setDisplayConfigurable('form', TRUE);
|
||||||
->setDisplayConfigurable('view', TRUE);
|
|
||||||
|
|
||||||
$fields['last_name'] = BaseFieldDefinition::create('string')
|
$fields['last_name'] = BaseFieldDefinition::create('string')
|
||||||
->setLabel(t('Last Name'))
|
->setLabel(t('Last Name'))
|
||||||
@ -271,18 +257,11 @@ class Person extends RevisionableContentEntityBase implements PersonInterface {
|
|||||||
'max_length' => 50,
|
'max_length' => 50,
|
||||||
'text_processing' => 0,
|
'text_processing' => 0,
|
||||||
])
|
])
|
||||||
->setDefaultValue('')
|
|
||||||
->setDisplayOptions('view', [
|
|
||||||
'label' => 'above',
|
|
||||||
'type' => 'string',
|
|
||||||
'weight' => -4,
|
|
||||||
])
|
|
||||||
->setDisplayOptions('form', [
|
->setDisplayOptions('form', [
|
||||||
'type' => 'string_textfield',
|
'type' => 'string_textfield',
|
||||||
'weight' => -4,
|
'weight' => -4,
|
||||||
])
|
])
|
||||||
->setDisplayConfigurable('form', TRUE)
|
->setDisplayConfigurable('form', TRUE)
|
||||||
->setDisplayConfigurable('view', TRUE)
|
|
||||||
->setRequired(TRUE);
|
->setRequired(TRUE);
|
||||||
|
|
||||||
$fields['status'] = BaseFieldDefinition::create('boolean')
|
$fields['status'] = BaseFieldDefinition::create('boolean')
|
||||||
|
Reference in New Issue
Block a user