function aggregator_requirements

Implements hook_requirements().

File

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

Code

function aggregator_requirements($phase) {
  $has_curl = function_exists('curl_init');
  $requirements = [];
  $requirements['curl'] = [
    'title' => t('cURL'),
    'value' => $has_curl ? t('Enabled') : t('Not found'),
  ];
  if (!$has_curl) {
    $requirements['curl']['severity'] = REQUIREMENT_ERROR;
    $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>.');
  }
  return $requirements;
}

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