-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbolt_connect.install
30 lines (29 loc) · 1 KB
/
bolt_connect.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
29
30
<?php
function bolt_connect_requirements($phase) {
$requirements = [];
if ($phase === 'runtime') {
$config = \Drupal::config('bolt_connect.settings');
if ($config->get('twig_namespaces_file_path')) {
if (!file_exists(DRUPAL_ROOT . '/' . $config->get('twig_namespaces_file_path'))) {
$requirements['bolt_connect'] = [
'title' => t('Bolt Connect Module'),
'description' => t('Could not find Bolt Twig Namespace file; please compile Bolt assets.'),
'severity' => REQUIREMENT_ERROR,
];
} else {
$requirements['bolt_connect'] = [
'title' => t('Bolt Connect Module'),
'description' => t('Bolt Twig Namespace file found.'),
'severity' => REQUIREMENT_OK,
];
}
} else {
$requirements['bolt_connect'] = [
'title' => t('Bolt Connect Module'),
'description' => t('Bolt Connect Module not configured.'),
'severity' => REQUIREMENT_WARNING,
];
}
}
return $requirements;
}