function aggregator_update_8200

Make the 'Source feed' field for aggregator items required.

File

core/modules/aggregator/aggregator.install, line 35

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.