function opigno_learning_path_update_8018 in Opigno Learning path 8
Remove module global availability fields.
File
- ./
opigno_learning_path.install, line 550 - Install, update and uninstall functions for the module.
Code
function opigno_learning_path_update_8018() {
$entity_type = 'opigno_module';
$fields = [
'module_always',
'open_date',
'close_date',
];
$update_manager = Drupal::service('entity.definition_update_manager');
foreach ($fields as $field) {
$definition = $update_manager
->getFieldStorageDefinition($field, $entity_type);
if ($definition) {
$update_manager
->uninstallFieldStorageDefinition($definition);
}
}
}