function opigno_module_update_8014 in Opigno module 8
Make field "name" for "opigno_module" entity required.
File
- ./
opigno_module.install, line 930 - Opigno module app install/update functionality.
Code
function opigno_module_update_8014() {
$definition_update_manager = \Drupal::entityDefinitionUpdateManager();
/* @var \Drupal\Core\Field\BaseFieldDefinition $field_definition */
$field_definition = $definition_update_manager
->getFieldStorageDefinition('name', 'opigno_module');
$field_definition
->setRequired(TRUE);
$field_definition
->setDefaultValue(NULL);
$definition_update_manager
->updateFieldStorageDefinition($field_definition);
}