file bootstrap.theme

The primary PHP file for the Drupal Bootstrap base theme.

This file should only contain light helper functions and point to stubs in other files containing more complex functions.

The stubs should point to files within the ./includes directory named after the function itself minus the theme prefix. If the stub contains a group of functions, then please organize them so they are related in some way and name the file appropriately to at least hint at what it contains.

All [pre]process functions, theme functions and template files lives inside the ./templates directory. This is a highly automated and complex system designed to only load the necessary files when a given theme hook is invoked.

Visit this project's official documentation site, http://drupal-bootstrap.org or the markdown files inside the ./docs directory.

See Also

Source
  1. <?php
  2. /**
  3. * @file
  4. * The primary PHP file for the Drupal Bootstrap base theme.
  5. *
  6. * This file should only contain light helper functions and point to stubs in
  7. * other files containing more complex functions.
  8. *
  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.
  13. *
  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.
  17. *
  18. * Visit this project's official documentation site, http://drupal-bootstrap.org
  19. * or the markdown files inside the `./docs` directory.
  20. *
  21. * @see bootstrap_theme()
  22. * @see \Drupal\bootstrap\Registry
  23. */
  24. use Drupal\bootstrap\Bootstrap;
  25. /**
  26. * Initialize the active theme.
  27. */
  28. Bootstrap::initialize();
  29. /**
  30. * {@inheritdoc}
  31. *
  32. * @see hook_bootstrap_colorize_text_alter().
  33. */
  34. function bootstrap_bootstrap_colorize_text_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
  35. Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
  36. }
  37. /**
  38. * {@inheritdoc}
  39. *
  40. * @see hook_bootstrap_iconize_text_alter().
  41. */
  42. function bootstrap_bootstrap_iconize_text_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
  43. Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
  44. }
  45. /**
  46. * {@inheritdoc}
  47. *
  48. * @see hook_bootstrap_layouts_class_options_alter().
  49. */
  50. function bootstrap_bootstrap_layouts_class_options_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
  51. Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
  52. }
  53. /**
  54. * {@inheritdoc}
  55. *
  56. * @see \Drupal\bootstrap\Plugin\Alter\ElementInfo::alter()
  57. */
  58. function bootstrap_element_info_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
  59. Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
  60. }
  61. /**
  62. * {@inheritdoc}
  63. *
  64. * @see \Drupal\bootstrap\Theme::alter()
  65. */
  66. function bootstrap_form_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
  67. Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
  68. }
  69. /**
  70. * {@inheritdoc}
  71. *
  72. * @see \Drupal\bootstrap\Plugin\Form\SystemThemeSettings::alterForm()
  73. */
  74. function bootstrap_form_system_theme_settings_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
  75. Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
  76. }
  77. /**
  78. * {@inheritdoc}
  79. */
  80. function bootstrap_js_settings_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
  81. Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
  82. }
  83. /**
  84. * {@inheritdoc}
  85. *
  86. * @see \Drupal\bootstrap\Plugin\Alter\LibraryInfo::alter()
  87. */
  88. function bootstrap_library_info_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
  89. Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
  90. }
  91. /**
  92. * {@inheritdoc}
  93. *
  94. * @see \Drupal\bootstrap\Plugin\Alter\PageAttachments::alter()
  95. */
  96. function bootstrap_page_attachments_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
  97. Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
  98. }
  99. /**
  100. * {@inheritdoc}
  101. *
  102. * @see \Drupal\bootstrap\Bootstrap::preprocess()
  103. */
  104. function bootstrap_preprocess(&$variables, $hook, $info) {
  105. Bootstrap::preprocess($variables, $hook, $info);
  106. }
  107. /**
  108. * {@inheritdoc}
  109. *
  110. * @see \Drupal\bootstrap\Bootstrap::getInfo()
  111. */
  112. function bootstrap_theme() {
  113. return Bootstrap::getThemeHooks();
  114. }
  115. /**
  116. * {@inheritdoc}
  117. *
  118. * @see \Drupal\bootstrap\Plugin\Alter\ThemeRegistry::alter()
  119. *
  120. * @todo Remove once a proper replacement for the theme.registry service can be
  121. * created in a bootstrap_core sub-module.
  122. */
  123. function bootstrap_theme_registry_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
  124. Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
  125. }
  126. /**
  127. * {@inheritdoc}
  128. *
  129. * @see \Drupal\bootstrap\Plugin\Alter\ThemeSuggestions::alter()
  130. */
  131. function bootstrap_theme_suggestions_alter(&$data, &$context1 = NULL, &$context2 = NULL) {
  132. Bootstrap::alter(__FUNCTION__, $data, $context1, $context2);
  133. }

Functions