function aggregator_update_8200 in Drupal 8
Make the 'Source feed' field for aggregator items required.
File
- core/
modules/ aggregator/ aggregator.install, line 35 - Install, update and uninstall functions for the aggregator module.
Code
function aggregator_update_8200() {
// aggregator_update_8001() did not update the last installed field storage
// definition for the aggregator item's 'Source feed' field.
$definition_update_manager = \Drupal::entityDefinitionUpdateManager();
$field_definition = $definition_update_manager
->getFieldStorageDefinition('fid', 'aggregator_item');
$field_definition
->setRequired(TRUE);
$definition_update_manager
->updateFieldStorageDefinition($field_definition);
}