4 * The primary PHP file for the Drupal Bootstrap base theme.
6 * This file should only contain light helper functions and point to stubs in
7 * other files containing more complex functions.
9 * The stubs should point to files within the `./includes` directory named after
10 * the function itself minus the theme prefix. If the stub contains a group of
11 * functions, then please organize them so they are related in some way and name
12 * the file appropriately to at least hint at what it contains.
14 * All [pre]process functions, theme functions and template files lives inside
15 * the `./templates` directory. This is a highly automated and complex system
16 * designed to only load the necessary files when a given theme hook is invoked.
18 * Visit this project's official documentation site, http://drupal-bootstrap.org
19 * or the markdown files inside the `./docs` directory.
21 * @see bootstrap_theme()
22 * @see \Drupal\bootstrap\Registry
25 use Drupal\bootstrap\Bootstrap;
28 * Initialize the active theme.
30 Bootstrap::initialize();
35 * @see hook_bootstrap_colorize_text_alter().
37 function bootstrap_bootstrap_colorize_text_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
38 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
44 * @see hook_bootstrap_iconize_text_alter().
46 function bootstrap_bootstrap_iconize_text_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
47 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
53 * @see hook_bootstrap_layouts_class_options_alter().
55 function bootstrap_bootstrap_layouts_class_options_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
56 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
62 * @see \Drupal\bootstrap\Plugin\Alter\ElementInfo::alter()
64 function bootstrap_element_info_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
65 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
71 * @see \Drupal\bootstrap\Theme::alter()
73 function bootstrap_form_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
74 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
80 * @see \Drupal\bootstrap\Plugin\Form\SystemThemeSettings::alterForm()
82 function bootstrap_form_system_theme_settings_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
83 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
89 function bootstrap_js_settings_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
90 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
96 * @see \Drupal\bootstrap\Plugin\Alter\LibraryInfo::alter()
98 function bootstrap_library_info_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
99 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
105 * @see \Drupal\bootstrap\Plugin\Alter\PageAttachments::alter()
107 function bootstrap_page_attachments_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
108 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
114 * @see \Drupal\bootstrap\Bootstrap::preprocess()
116 function bootstrap_preprocess(&$variables, $hook, $info) {
117 Bootstrap::preprocess($variables, $hook, $info);
123 * @see \Drupal\bootstrap\Bootstrap::getInfo()
125 function bootstrap_theme() {
126 return Bootstrap::getThemeHooks();
132 * @see \Drupal\bootstrap\Plugin\Alter\ThemeRegistry::alter()
134 * @todo Remove once a proper replacement for the theme.registry service can be
135 * created in a bootstrap_core sub-module.
137 function bootstrap_theme_registry_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
138 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
144 * @see \Drupal\bootstrap\Plugin\Alter\ThemeSuggestions::alter()
146 function bootstrap_theme_suggestions_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
147 Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);