function aggregator_update_8501

Add a default value for the 'Refresh' field for aggregator feed entities.

File

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

Code

function aggregator_update_8501() {
    $definition_update_manager = \Drupal::entityDefinitionUpdateManager();
    $field_definition = $definition_update_manager->getFieldStorageDefinition('refresh', 'aggregator_feed');
    $field_definition->setDefaultValue(3600);
    $definition_update_manager->updateFieldStorageDefinition($field_definition);
}

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