Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace DrupalnflEntity;
- use DrupalCoreEntityEntityStorageInterface;
- use DrupalCoreFieldBaseFieldDefinition;
- use DrupalCoreEntityContentEntityBase;
- use DrupalCoreEntityEntityTypeInterface;
- use DrupalnflFactInterface;
- use DrupaluserUserInterface;
- use DrupalCoreEntityEntityChangedTrait;
- $fields['flouride'] = BaseFieldDefinition::create('integer')
- ->setLabel(t('Flouride'))
- ->setRequired(FALSE)
- ->setSettings(array('default_value' => 0, 'suffix' => 'g', 'max_length' => 8, 'min' => 0, 'text_processing' => 0))
- ->setDisplayOptions('view', array('label' => 'inline', 'type' => 'number', 'weight' => 24))
- ->setDisplayOptions('form', array('type' => 'number', 'weight' => 24))
- ->setDisplayConfigurable('form', TRUE)
- ->setDisplayConfigurable('view', TRUE);
Add Comment
Please, Sign In to add comment