b6ca21cd288d8ff89a687ebc772240b7a986fa65
[yaffs-website] / web / themes / contrib / bootstrap / bootstrap.theme
1 <?php
2
3 /**
4  * @file
5  * The primary PHP file for the Drupal Bootstrap base theme.
6  *
7  * This file should only contain light helper functions and point to stubs in
8  * other files containing more complex functions.
9  *
10  * The stubs should point to files within the `./includes` directory named after
11  * the function itself minus the theme prefix. If the stub contains a group of
12  * functions, then please organize them so they are related in some way and name
13  * the file appropriately to at least hint at what it contains.
14  *
15  * All [pre]process functions, theme functions and template files lives inside
16  * the `./templates` directory. This is a highly automated and complex system
17  * designed to only load the necessary files when a given theme hook is invoked.
18  *
19  * Visit this project's official documentation site https://drupal-bootstrap.org
20  * or the markdown files inside the `./docs` directory.
21  *
22  * @see bootstrap_theme()
23  * @see \Drupal\bootstrap\Registry
24  */
25
26 use Drupal\bootstrap\Bootstrap;
27
28 /**
29  * Initialize the active theme.
30  */
31 Bootstrap::initialize();
32
33 /**
34  * {@inheritdoc}
35  *
36  * @see hook_bootstrap_colorize_text_alter()
37  */
38 function bootstrap_bootstrap_colorize_text_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
39   Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
40 }
41
42 /**
43  * {@inheritdoc}
44  *
45  * @see hook_bootstrap_iconize_text_alter()
46  */
47 function bootstrap_bootstrap_iconize_text_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
48   Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
49 }
50
51 /**
52  * {@inheritdoc}
53  *
54  * @see hook_bootstrap_layouts_class_options_alter()
55  */
56 function bootstrap_bootstrap_layouts_class_options_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
57   Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
58 }
59
60 /**
61  * {@inheritdoc}
62  *
63  * @see \Drupal\bootstrap\Plugin\Alter\ElementInfo::alter()
64  */
65 function bootstrap_element_info_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
66   Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
67 }
68
69 /**
70  * {@inheritdoc}
71  *
72  * @see \Drupal\bootstrap\Theme::alter()
73  */
74 function bootstrap_form_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
75   Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
76 }
77
78 /**
79  * {@inheritdoc}
80  *
81  * @see \Drupal\bootstrap\Plugin\Form\SystemThemeSettings::alterForm()
82  */
83 function bootstrap_form_system_theme_settings_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
84   Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
85 }
86
87 /**
88  * {@inheritdoc}
89  */
90 function bootstrap_js_settings_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
91   Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
92 }
93
94 /**
95  * {@inheritdoc}
96  *
97  * @see \Drupal\bootstrap\Plugin\Alter\LibraryInfo::alter()
98  */
99 function bootstrap_library_info_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
100   Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
101 }
102
103 /**
104  * {@inheritdoc}
105  *
106  * @see \Drupal\bootstrap\Plugin\Alter\PageAttachments::alter()
107  */
108 function bootstrap_page_attachments_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
109   Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
110 }
111
112 /**
113  * {@inheritdoc}
114  *
115  * @see \Drupal\bootstrap\Bootstrap::preprocess()
116  */
117 function bootstrap_preprocess(&$variables, $hook, $info) {
118   Bootstrap::preprocess($variables, $hook, $info);
119 }
120
121 /**
122  * {@inheritdoc}
123  *
124  * @see \Drupal\bootstrap\Bootstrap::getInfo()
125  */
126 function bootstrap_theme() {
127   return Bootstrap::getThemeHooks();
128 }
129
130 /**
131  * {@inheritdoc}
132  *
133  * @see \Drupal\bootstrap\Plugin\Alter\ThemeRegistry::alter()
134  *
135  * @todo Remove once a proper replacement for the theme.registry service can be
136  * created in a bootstrap_core sub-module.
137  */
138 function bootstrap_theme_registry_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
139   Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
140 }
141
142 /**
143  * {@inheritdoc}
144  *
145  * @see \Drupal\bootstrap\Plugin\Alter\ThemeSuggestions::alter()
146  */
147 function bootstrap_theme_suggestions_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
148   Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
149 }