summaryrefslogtreecommitdiff
path: root/timelinejs.install
blob: 8db50d39321a3ac84d4a2a9ee4e8962559689369 (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('timelinejs');
    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;
}