function fb_instant_articles_requirements in Facebook Instant Articles 7.2
Same name and namespace in other branches
- 7 fb_instant_articles.install \fb_instant_articles_requirements()
Implements hook_requirements().
File
- ./
fb_instant_articles.install, line 28 - Install and update functions for Facebook Instant Articles Base module.
Code
function fb_instant_articles_requirements() {
$requirements = array();
$t = get_t();
$bypass_composer_manager = variable_get('fb_instant_articles_bypass_composer_manager');
$composer_manager_enabled = module_exists('composer_manager');
if (!($bypass_composer_manager || $composer_manager_enabled)) {
$string = 'The Facebook Instant Articles module requires the
facebook-instant-articles-sdk-php library, and Composer autoloading. The
easiest way to set this up is to enable the <a href="@composer-manager">
Composer manager</a> module, which autoloads classes needed for the Facebook
Instant Articles SDK, and downloads the SDK automatically when you enable the
base module. Composer manager is not a literal dependency so that developers
with custom Composer workflows can choose to manage dependencies and
autoloading themselves (if this is the case you will need to include
Composer\'s autoload file somewhere in your code).';
$args = array(
'@composer-manager' => 'https://drupal.org/project/composer_manager',
);
$requirements['autoload']['description'] = $t($string, $args);
$requirements['autoload']['severity'] = REQUIREMENT_ERROR;
}
return $requirements;
}