Skip to content

Instantly share code, notes, and snippets.

@EclipseGc
Created September 7, 2014 15:48
Show Gist options
  • Save EclipseGc/61468a7b0cd01df728eb to your computer and use it in GitHub Desktop.
Save EclipseGc/61468a7b0cd01df728eb to your computer and use it in GitHub Desktop.
<?php
/**
* Implements hook_requirements().
*/
function git_config_requirements($phase) {
$requirements = array();
$requirements['git-wrapper'] = array(
'title' => t('Git Wrapper'),
'value' => t('!wrapper is required to use the git_config module.', array('!wrapper' => l('Git Wrapper', 'https://github.com/cpliakas/git-wrapper'))),
);
if (!class_exists('GitWrapper\GitWrapper')) {
$requirements['git-wrapper']['description'] = t('You must install the GitWrapper PHP component to make use of the git_config module.');
$requirements['git-wrapper']['severity'] = REQUIREMENT_ERROR;
}
return $requirements;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment