forked from acquia/acquia_cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
acquia_cms.module
40 lines (36 loc) · 1.19 KB
/
acquia_cms.module
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
34
35
36
37
38
39
40
<?php
/**
* @file
* Contains hook implementations for acquia_cms module.
*/
/**
* Implements hook_preprocess_HOOK().
*/
function acquia_cms_preprocess_status_report_general_info(&$variables) {
$extensionInfo = \Drupal::service('extension.list.module')->getExtensionInfo('acquia_cms');
$variables['acquia_cms']['value'] = $extensionInfo['version'];
}
/**
* Implements hook_form_FORM_ID_alter().
*/
function acquia_cms_form_user_login_form_alter(array &$form) {
if (Drupal::config('acquia_cms.settings')->get('user_login_redirection')) {
$form['#submit'][] = '\Drupal\acquia_cms\RedirectHandler::submitForm';
}
}
/**
* Prepares variables for maintenance page templates.
*
* Default template: maintenance-page.html.twig.
*
* @param array $variables
* An associative array containing:
* - content - An array of page content.
*
* @see template_preprocess_maintenance_page()
*/
function acquia_cms_preprocess_maintenance_page(array &$variables) {
$variables['#attached']['library'][] = 'seven/install-page';
$acquia_cms_path = \Drupal::service('extension.list.module')->getPath('acquia_cms');
$variables['install_page_logo_path'] = '/' . $acquia_cms_path . '/acquia_cms.png';
}