5 * The primary PHP file for the Drupal Bootstrap base theme.
7 * This file should only contain light helper functions and point to stubs in
8 * other files containing more complex functions.
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.
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.
19 * Visit this project's official documentation site https://drupal-bootstrap.org
20 * or the markdown files inside the `./docs` directory.
22 * @see bootstrap_theme()
23 * @see \Drupal\bootstrap\Registry
26 use Drupal\bootstrap\Bootstrap;
29 * Initialize the active theme.
31 Bootstrap::initialize();
36 * @see hook_bootstrap_colorize_text_alter()
38 function bootstrap_bootstrap_colorize_text_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
39 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
45 * @see hook_bootstrap_iconize_text_alter()
47 function bootstrap_bootstrap_iconize_text_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
48 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
54 * @see hook_bootstrap_layouts_class_options_alter()
56 function bootstrap_bootstrap_layouts_class_options_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
57 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
63 * @see \Drupal\bootstrap\Plugin\Alter\ElementInfo::alter()
65 function bootstrap_element_info_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
66 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
72 * @see \Drupal\bootstrap\Theme::alter()
74 function bootstrap_form_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
75 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
81 * @see \Drupal\bootstrap\Plugin\Form\SystemThemeSettings::alterForm()
83 function bootstrap_form_system_theme_settings_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
84 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
90 function bootstrap_js_settings_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
91 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
97 * @see \Drupal\bootstrap\Plugin\Alter\LibraryInfo::alter()
99 function bootstrap_library_info_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
100 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
106 * @see \Drupal\bootstrap\Plugin\Alter\PageAttachments::alter()
108 function bootstrap_page_attachments_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
109 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
115 * @see \Drupal\bootstrap\Bootstrap::preprocess()
117 function bootstrap_preprocess(&$variables, $hook, $info) {
118 Bootstrap::preprocess($variables, $hook, $info);
124 * @see \Drupal\bootstrap\Bootstrap::getInfo()
126 function bootstrap_theme() {
127 return Bootstrap::getThemeHooks();
133 * @see \Drupal\bootstrap\Plugin\Alter\ThemeRegistry::alter()
135 * @todo Remove once a proper replacement for the theme.registry service can be
136 * created in a bootstrap_core sub-module.
138 function bootstrap_theme_registry_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
139 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
145 * @see \Drupal\bootstrap\Plugin\Alter\ThemeSuggestions::alter()
147 function bootstrap_theme_suggestions_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
148 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);