Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $fields['title'] = BaseFieldDefinition::create('string')
- ->setLabel(t('Name'))
- ->setTranslatable(TRUE)
- ->setDescription(t('The name of the item'))
- ->setSettings(array(
- 'default_value' => '',
- 'max_length' => 255,
- 'text_processing' => 0,
- ))
- ->setDisplayOptions('view', array(
- 'label' => 'above',
- 'type' => 'string',
- 'weight' => -6,
- ))
- ->setDisplayOptions('form', array(
- 'type' => 'string_textfield',
- 'weight' => -6,
- ))
- ->setDisplayConfigurable('form', TRUE)
- ->setDisplayConfigurable('view', TRUE);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement