Advertisement
Guest User

Untitled

a guest
Sep 15th, 2016
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. $fields['title'] = BaseFieldDefinition::create('string')
  2. ->setLabel(t('Name'))
  3. ->setTranslatable(TRUE)
  4. ->setDescription(t('The name of the item'))
  5. ->setSettings(array(
  6. 'default_value' => '',
  7. 'max_length' => 255,
  8. 'text_processing' => 0,
  9. ))
  10. ->setDisplayOptions('view', array(
  11. 'label' => 'above',
  12. 'type' => 'string',
  13. 'weight' => -6,
  14. ))
  15. ->setDisplayOptions('form', array(
  16. 'type' => 'string_textfield',
  17. 'weight' => -6,
  18. ))
  19. ->setDisplayConfigurable('form', TRUE)
  20. ->setDisplayConfigurable('view', TRUE);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement