Made all base fields on actors not configurable
Making them configurable seems to mess up weights and stuff.
This commit is contained in:
parent
9424aca1e9
commit
a8c454c509
@ -235,7 +235,7 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
|||||||
->setDisplayOptions('view', [
|
->setDisplayOptions('view', [
|
||||||
'label' => 'inline',
|
'label' => 'inline',
|
||||||
'type' => 'author',
|
'type' => 'author',
|
||||||
'weight' => -4,
|
'weight' => -10,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$fields['first_name'] = BaseFieldDefinition::create('string')
|
$fields['first_name'] = BaseFieldDefinition::create('string')
|
||||||
@ -250,11 +250,11 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
|||||||
->setDisplayOptions('view', [
|
->setDisplayOptions('view', [
|
||||||
'label' => 'above',
|
'label' => 'above',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'weight' => -3,
|
'weight' => -9,
|
||||||
])
|
])
|
||||||
->setDisplayOptions('form', [
|
->setDisplayOptions('form', [
|
||||||
'type' => 'string_textfield',
|
'type' => 'string_textfield',
|
||||||
'weight' => -3,
|
'weight' => -9,
|
||||||
])
|
])
|
||||||
->setRequired(TRUE);
|
->setRequired(TRUE);
|
||||||
|
|
||||||
@ -270,11 +270,11 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
|||||||
->setDisplayOptions('view', [
|
->setDisplayOptions('view', [
|
||||||
'label' => 'above',
|
'label' => 'above',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'weight' => -2,
|
'weight' => -8,
|
||||||
])
|
])
|
||||||
->setDisplayOptions('form', [
|
->setDisplayOptions('form', [
|
||||||
'type' => 'string_textfield',
|
'type' => 'string_textfield',
|
||||||
'weight' => -2,
|
'weight' => -8,
|
||||||
])
|
])
|
||||||
->setRequired(FALSE);
|
->setRequired(FALSE);
|
||||||
|
|
||||||
@ -290,11 +290,11 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
|||||||
->setDisplayOptions('view', [
|
->setDisplayOptions('view', [
|
||||||
'label' => 'above',
|
'label' => 'above',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'weight' => -2,
|
'weight' => -7,
|
||||||
])
|
])
|
||||||
->setDisplayOptions('form', [
|
->setDisplayOptions('form', [
|
||||||
'type' => 'string_textfield',
|
'type' => 'string_textfield',
|
||||||
'weight' => -2,
|
'weight' => -7,
|
||||||
])
|
])
|
||||||
->setRequired(TRUE);
|
->setRequired(TRUE);
|
||||||
|
|
||||||
@ -306,7 +306,7 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
|||||||
->setRequired(TRUE)
|
->setRequired(TRUE)
|
||||||
->setDisplayOptions('form', array(
|
->setDisplayOptions('form', array(
|
||||||
'type' => 'boolean_checkbox',
|
'type' => 'boolean_checkbox',
|
||||||
'weight' => -1,
|
'weight' => -6,
|
||||||
));
|
));
|
||||||
|
|
||||||
// Contact details.
|
// Contact details.
|
||||||
@ -321,16 +321,14 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
|||||||
->setDisplayOptions('view', array(
|
->setDisplayOptions('view', array(
|
||||||
'label' => 'above',
|
'label' => 'above',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'weight' => 0,
|
'weight' => -5,
|
||||||
))
|
))
|
||||||
->setDisplayOptions('form', array(
|
->setDisplayOptions('form', array(
|
||||||
'type' => 'string_textfield',
|
'type' => 'string_textfield',
|
||||||
'weight' => 0,
|
'weight' => -5,
|
||||||
));
|
));
|
||||||
$fields['phone'] = BaseFieldDefinition::create('string')
|
$fields['phone'] = BaseFieldDefinition::create('string')
|
||||||
->setLabel(t('Main Phone Number'))
|
->setLabel(t('Main Phone Number'))
|
||||||
->setDisplayConfigurable('view', TRUE)
|
|
||||||
->setDisplayConfigurable('form', TRUE)
|
|
||||||
->setSettings(array(
|
->setSettings(array(
|
||||||
'default_value' => '',
|
'default_value' => '',
|
||||||
'max_length' => 20,
|
'max_length' => 20,
|
||||||
@ -339,11 +337,11 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
|||||||
->setDisplayOptions('view', array(
|
->setDisplayOptions('view', array(
|
||||||
'label' => 'above',
|
'label' => 'above',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'weight' => 2,
|
'weight' => -4,
|
||||||
))
|
))
|
||||||
->setDisplayOptions('form', array(
|
->setDisplayOptions('form', array(
|
||||||
'type' => 'string_textfield',
|
'type' => 'string_textfield',
|
||||||
'weight' => 2,
|
'weight' => -4,
|
||||||
));
|
));
|
||||||
$fields['phone2'] = BaseFieldDefinition::create('string')
|
$fields['phone2'] = BaseFieldDefinition::create('string')
|
||||||
->setLabel(t('Alternative Phone Number'))
|
->setLabel(t('Alternative Phone Number'))
|
||||||
@ -352,22 +350,18 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
|||||||
'max_length' => 20,
|
'max_length' => 20,
|
||||||
'text_processing' => 0,
|
'text_processing' => 0,
|
||||||
))
|
))
|
||||||
->setDisplayConfigurable('view', TRUE)
|
|
||||||
->setDisplayConfigurable('form', TRUE)
|
|
||||||
->setDisplayOptions('view', array(
|
->setDisplayOptions('view', array(
|
||||||
'label' => 'above',
|
'label' => 'above',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'weight' => 3,
|
'weight' => -3,
|
||||||
))
|
))
|
||||||
->setDisplayOptions('form', array(
|
->setDisplayOptions('form', array(
|
||||||
'type' => 'string_textfield',
|
'type' => 'string_textfield',
|
||||||
'weight' => 3,
|
'weight' => -3,
|
||||||
));
|
));
|
||||||
$fields['postal_address'] = BaseFieldDefinition::create('string_long')
|
$fields['postal_address'] = BaseFieldDefinition::create('string_long')
|
||||||
->setLabel(t('Postal Address'))
|
->setLabel(t('Postal Address'))
|
||||||
->setDescription(t('Full address, apart from post code.'))
|
->setDescription(t('Full address, apart from post code.'))
|
||||||
->setDisplayConfigurable('view', TRUE)
|
|
||||||
->setDisplayConfigurable('form', TRUE)
|
|
||||||
->setSettings(array(
|
->setSettings(array(
|
||||||
'default_value' => '',
|
'default_value' => '',
|
||||||
'max_length' => 255,
|
'max_length' => 255,
|
||||||
@ -376,11 +370,11 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
|||||||
->setDisplayOptions('view', array(
|
->setDisplayOptions('view', array(
|
||||||
'label' => 'above',
|
'label' => 'above',
|
||||||
'type' => 'basic_string',
|
'type' => 'basic_string',
|
||||||
'weight' => 5,
|
'weight' => -2,
|
||||||
))
|
))
|
||||||
->setDisplayOptions('form', array(
|
->setDisplayOptions('form', array(
|
||||||
'type' => 'string_textarea',
|
'type' => 'string_textarea',
|
||||||
'weight' => 5,
|
'weight' => -2,
|
||||||
));
|
));
|
||||||
$fields['post_code'] = BaseFieldDefinition::create('string')
|
$fields['post_code'] = BaseFieldDefinition::create('string')
|
||||||
->setLabel(t('Post Code'))
|
->setLabel(t('Post Code'))
|
||||||
@ -392,11 +386,11 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
|||||||
->setDisplayOptions('view', array(
|
->setDisplayOptions('view', array(
|
||||||
'label' => 'above',
|
'label' => 'above',
|
||||||
'type' => 'string',
|
'type' => 'string',
|
||||||
'weight' => 6,
|
'weight' => 1-1,
|
||||||
))
|
))
|
||||||
->setDisplayOptions('form', array(
|
->setDisplayOptions('form', array(
|
||||||
'type' => 'string_textfield',
|
'type' => 'string_textfield',
|
||||||
'weight' => 6,
|
'weight' => -1,
|
||||||
));
|
));
|
||||||
|
|
||||||
$fields['created'] = BaseFieldDefinition::create('created')
|
$fields['created'] = BaseFieldDefinition::create('created')
|
||||||
|
Reference in New Issue
Block a user