summaryrefslogtreecommitdiff
path: root/timelinejs.install
diff options
context:
space:
mode:
Diffstat (limited to 'timelinejs.install')
-rw-r--r--timelinejs.install27
1 files changed, 27 insertions, 0 deletions
diff --git a/timelinejs.install b/timelinejs.install
new file mode 100644
index 0000000..c2fd4a1
--- /dev/null
+++ b/timelinejs.install
@@ -0,0 +1,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;
+}