5 * Install, update and uninstall functions for the aggregator module.
9 * Implements hook_requirements().
11 function aggregator_requirements($phase) {
12 $has_curl = function_exists('curl_init');
14 $requirements['curl'] = [
16 'value' => $has_curl ? t('Enabled') : t('Not found'),
19 $requirements['curl']['severity'] = REQUIREMENT_ERROR;
20 $requirements['curl']['description'] = t('The Aggregator module requires the <a href="https://secure.php.net/manual/en/curl.setup.php">PHP cURL library</a>. For more information, see the <a href="https://www.drupal.org/requirements/php/curl">online information on installing the PHP cURL extension</a>.');
26 * The simple presence of this update function clears cached field definitions.
28 function aggregator_update_8001() {
29 // Feed ID base field is now required.
33 * Make the 'Source feed' field for aggregator items required.
35 function aggregator_update_8200() {
36 // aggregator_update_8001() did not update the last installed field storage
37 // definition for the aggregator item's 'Source feed' field.
38 $definition_update_manager = \Drupal::entityDefinitionUpdateManager();
39 $field_definition = $definition_update_manager->getFieldStorageDefinition('fid', 'aggregator_item');
40 $field_definition->setRequired(TRUE);
41 $definition_update_manager->updateFieldStorageDefinition($field_definition);