You are here

function aggregator_update_8501 in Drupal 8

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

File

core/modules/aggregator/aggregator.install, line 47
Install, update and uninstall functions for the aggregator module.

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