-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfits.install
28 lines (25 loc) · 979 Bytes
/
fits.install
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
28
<?php
/**
* @file
* Contains fits.install.
*/
/**
* Implements hook_requirements().
*/
function fits_requirements($phase): array {
$requirements = [];
if (!class_exists('JmesPath\\AstRuntime')) {
$arguments = [
':docs' => 'https://www.drupal.org/docs/8/theming-drupal-8/adding-stylesheets-css-and-javascript-js-to-a-drupal-8-theme#external',
':readme' => 'https://www.drupal.org/project/fits',
':lib' => "composer require 'mtdowling/jmespath.php'",
];
$requirements['JmesPath.php'] = [
'title' => t('JmesPath.php'),
'value' => t('JmesPath.php is not installed.'),
'severity' => REQUIREMENT_ERROR,
'description' => t('The <i>JmesPath.php</i> library is not installed. Run <i><code>:lib</code></i> to install it, check the <a href=":readme">README.md</a> for more information and <a href=":docs">the documentation for information on how to install a library</a>.', $arguments),
];
}
return $requirements;
}