SHARE
TWEET

Untitled

a guest Sep 15th, 2016 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top