You are here

function chosen_requirements in Chosen 6

Same name and namespace in other branches
  1. 8.2 chosen.install \chosen_requirements()
  2. 7.3 chosen.install \chosen_requirements()
  3. 7 chosen.install \chosen_requirements()
  4. 7.2 chosen.install \chosen_requirements()
  5. 3.0.x chosen.install \chosen_requirements()

Implements hook_requirements().

File

./chosen.install, line 10
Installation and uninstallation functions.

Code

function chosen_requirements($phase) {
  module_load_include('module', 'libraries');
  module_load_include('module', 'chosen', 'chosen');
  $requirements['chosen_js'] = array(
    'title' => t('Chosen JavaScript file'),
    'value' => chosen_js_path() ? t('Available') : t('Unavailable'),
    'description' => !chosen_js_path() ? t('Place <code>chosen.jquery.min.js</code> or <code>chosen.jquery.js</code> in <em>sites/all/libraries/chosen/chosen</em>.') : NULL,
    'severity' => chosen_js_path() ? REQUIREMENT_OK : REQUIREMENT_ERROR,
  );
  return $requirements;
}