You are here

function views_slideshow_liquidcarousel_requirements in Views Slideshow Liquid Carousel 7

Same name and namespace in other branches
  1. 7.2 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' || $phase == 'install') {
    $requirements['liquidcarousel'] = array(
      'title' => t('jQuery Liquid Carousel'),
    );
    if (!_views_slideshow_liquidcarousel_library_path()) {
      $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;
}