You are here

zurb_twentytwenty.install in ZURB TwentyTwenty 7

Same filename and directory in other branches
  1. 8 zurb_twentytwenty.install
  2. 2.0.x zurb_twentytwenty.install

File

zurb_twentytwenty.install
View source
<?php

/**
 * Implementation of hook_requirements().
 * @param $phase
 * @return array
 */
function zurb_twentytwenty_requirements($phase) {
  $requirements = array();
  switch ($phase) {
    case 'install':
    case 'runtime':
      $file_exists = file_exists(libraries_get_path('twentytwenty') . '/js/jquery.twentytwenty.js');
      $requirements['zurb_twentytwenty'] = array(
        'title' => t('ZURB TwentyTwenty Plugin'),
        'value' => t('!msg', array(
          '!msg' => $file_exists ? 'Installed' : 'The ' . l('ZURB TwentyTwenty', 'https://github.com/zurb/twentytwenty') . ' was not found. Please ' . l('download', 'https://github.com/zurb/twentytwenty') . ' it into the Libraries folder (sites/all/libraries/twentytwenty).',
        )),
        'severity' => $file_exists ? REQUIREMENT_OK : REQUIREMENT_ERROR,
      );
      break;
  }
  return $requirements;
}

Functions

Namesort descending Description
zurb_twentytwenty_requirements Implementation of hook_requirements().