--- /dev/null
+<?php
+
+/**
+ * @file
+ * Installation actions for Slick.
+ */
+
+/**
+ * Implements hook_requirements().
+ */
+function slick_requirements($phase) {
+ if ($phase != 'runtime') {
+ return [];
+ }
+
+ if (function_exists('libraries_get_path')) {
+ $path = libraries_get_path('slick') . '/slick/slick.min.js';
+ }
+ else {
+ $path = DRUPAL_ROOT . '/libraries/slick/slick/slick.min.js';
+ }
+
+ $exists = is_file($path);
+
+ return [
+ 'slick_library' => [
+ 'title' => t('Slick library'),
+ 'description' => $exists ? '' : t('The <a href=":url">Slick library</a> should be installed at <strong>/libraries/slick/slick/slick.min.js</strong>, or any path supported by libraries.module if installed.', [':url' => 'https://github.com/kenwheeler/slick/']),
+ 'severity' => $exists ? REQUIREMENT_OK : REQUIREMENT_ERROR,
+ 'value' => $exists ? t('Installed') : t('Not installed'),
+ ],
+ ];
+}