summaryrefslogtreecommitdiff
path: root/timelinejs.install
blob: 5b2b21915d093145d8e0e3bea2865a14329dcb39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

/**
 * @file
 *   TimelineJS installation functions.
 */

/**
 * Implements hook_requirements()
 */
function timelinejs_requirements($phase) {
  $requirements = array();

  if ($phase == 'runtime') {
    $timelinejs = libraries_get_path('timeline');
    if (!is_dir($timelinejs)) {
      $requirements['timelinejs'] = array(
        'title'       => t('TimelineJS'),
        'value'       => t('Could not find timelinejs installation at libraries folder.'),
        'description' => t('Please download it from https://github.com/VeriteCo/Timeline'),
        'severity'    => REQUIREMENT_ERROR,
      );
    }
  }

  return $requirements;
}