You are here

function autofill_requirements in Autofill 6

Implementation of hook_requirements().

File

./autofill.install, line 19
Installation file for the Autofill module.

Code

function autofill_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime') {
    $path = libraries_get_path('jquery-autofill');
    if (!file_exists($path . '/jquery.autofill.min.js')) {
      $requirements['autofill'] = array(
        'title' => t('Autofill'),
        'severity' => REQUIREMENT_ERROR,
        'value' => 'Not found',
        'description' => t('The <a href="@jquery-autofill">jQuery autofill</a> plugin is missing. Download it to your <em>sites/all/libraries</em> directory.', array(
          '@jquery-autofill' => 'https://github.com/mmangino/jquery-autofill.git',
          '@download' => 'https://github.com/mmangino/jquery-autofill.git',
        )),
      );
    }
  }
  return $requirements;
}