You are here

function masked_input_requirements in Masked Input 7.2

Implements hook_requirements().

File

./masked_input.install, line 11
Install, uninstall, and requirements operations.

Code

function masked_input_requirements($phase) {
  module_load_include('module', 'libraries');
  $available = libraries_get_path('maskedinput');
  return array(
    'masked_input_library' => array(
      'title' => t('Masked Input'),
      'value' => $available ? t('Library is available') : t('Library is missing'),
      'description' => $available ? NULL : t('Please download the masked input library into "sites/all/libraries/maskedinput" or any alternative path that is supported by the libraries module. See README.txt for more information.'),
      'severity' => $available ? REQUIREMENT_OK : REQUIREMENT_ERROR,
    ),
  );
}