You are here

function jquery_colorpicker_requirements in Jquery Colorpicker 8

Same name and namespace in other branches
  1. 8.2 jquery_colorpicker.install \jquery_colorpicker_requirements()
  2. 6.2 jquery_colorpicker.install \jquery_colorpicker_requirements()
  3. 7 jquery_colorpicker.install \jquery_colorpicker_requirements()

Implements hook_requirements().

File

./jquery_colorpicker.install, line 11
Contains install and update functions for jquery_colorpicker.

Code

function jquery_colorpicker_requirements($phase) {
  $requirements = [];
  if ($phase == 'install') {
    if (!file_exists(DRUPAL_ROOT . '/libraries/jquery_colorpicker/js/colorpicker.js')) {
      $requirements['jquery_colorpicker'] = [
        'description' => t('The jQuery Colorpicker module requires the jQuery Colorpicker Library. See the README.txt file in the module folder for installation directions'),
        'severity' => REQUIREMENT_ERROR,
      ];
    }
  }
  return $requirements;
}