Guest User

Untitled

a guest
May 20th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. $fields['my_field'] = BaseFieldDefinition::create("list_string")
  2. ->setSetting('allowed_values', $$my_options)
  3. ->setLabel('My Field')
  4. ->setRequired(FALSE)
  5. ->setCardinality(-1)
  6. ->setDisplayOptions('form', array(
  7. 'type' => 'options_buttons',
  8. 'weight' => 5
  9. ))
  10. ->setDisplayConfigurable('form', TRUE)
  11. ->setDisplayConfigurable('view', TRUE);
Add Comment
Please, Sign In to add comment