W3cubDocs

/Drupal 8

function aggregator_requirements

aggregator_requirements($phase)

Implements hook_requirements().

File

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

Code

function aggregator_requirements($phase) {
  $has_curl = function_exists('curl_init');
  $requirements = array();
  $requirements['curl'] = array(
    '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 could not be installed because the PHP <a href="http://php.net/manual/curl.setup.php">cURL</a> library is not available.');
  }
  return $requirements;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!aggregator!aggregator.install/function/aggregator_requirements/8.1.x