-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmigrate_source_jsonpath.module
More file actions
33 lines (28 loc) · 948 Bytes
/
migrate_source_jsonpath.module
File metadata and controls
33 lines (28 loc) · 948 Bytes
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
29
30
31
32
33
<?php
/**
* @file
* Contains migrate_source_jsonpath.module.
*/
/**
* Implements hook_requirements().
*/
function migrate_source_jsonpath_requirements($phase) {
if (class_exists('\JsonPath\JsonObject')) {
$requirements['migrate_source_jsonpath'] = [
'title' => t('JSONPath library'),
'value' => 'Library installed',
'severity' => REQUIREMENT_INFO
];
return $requirements;
}
$requirements['migrate_source_jsonpath'] = [
'title' => t('JSONPath library'),
'value' => t('Library is missing'),
'description' => t('Please download JSONPath-PHP library using composer: <pre>composer require skyscanner/jsonpath:dev-master</pre> or download <a href=":url">@url</a> library and manually add it to class autoloader.', [
':url' => 'https://github.com/skyscanner/jsonpath-php',
'@url' => 'skyscanner/jsonpath-php',
]),
'severity' => REQUIREMENT_ERROR
];
return $requirements;
}