You are here

function views_slideshow_liquidcarousel_requirements in Views Slideshow Liquid Carousel 7.2

Same name and namespace in other branches
  1. 7 views_slideshow_liquidcarousel.install \views_slideshow_liquidcarousel_requirements()

Implements hook_requirements().

File

./views_slideshow_liquidcarousel.install, line 10
views_slideshow_liquidcarousel.views_slideshow.install

Code

function views_slideshow_liquidcarousel_requirements($phase) {
  $requirements = array();
  $t = get_t();
  module_load_include('module', 'libraries', 'libraries');
  module_load_include('module', 'views_slideshow_liquidcarousel', 'views_slideshow_liquidcarousel');
  if ($phase == 'runtime') {
    $requirements['liquidcarousel'] = array(
      'title' => t('jQuery Liquid Carousel'),
    );
    $library = libraries_load('liquidcarousel', 'minified');
    if (!$library['installed']) {
      $requirements['liquidcarousel']['description'] = _views_slideshow_liquidcarousel_get_install_error_message();
      $requirements['liquidcarousel']['severity'] = REQUIREMENT_ERROR;
      if ($phase == 'runtime') {
        $requirements['liquidcarousel']['value'] = $t('Missing');
      }
    }
    else {
      $requirements['liquidcarousel']['value'] = "1.0";
      $requirements['liquidcarousel']['severity'] = REQUIREMENT_OK;
    }
  }
  return $requirements;
}