function opigno_certificate_entity_field_storage_info in Opigno certificate 3.x
Same name and namespace in other branches
- 8 opigno_certificate.module \opigno_certificate_entity_field_storage_info()
Implements hook_entity_field_storage_info().
File
- ./
opigno_certificate.module, line 119 - Contains opigno_certificate.module.
Code
function opigno_certificate_entity_field_storage_info(EntityTypeInterface $entity_type) {
if ($entity_type
->id() == 'opigno_certificate') {
$fields['body'] = FieldStorageDefinition::create('text_long')
->setLabel(t('Body'))
->setName('body')
->setTargetEntityTypeId($entity_type
->id());
$fields['view_mode'] = FieldStorageDefinition::create('view_mode_selector')
->setLabel(t('View mode'))
->setName('view_mode')
->setTargetEntityTypeId($entity_type
->id());
return $fields;
}
}