Further modules included.
[yaffs-website] / web / modules / contrib / bootstrap_layouts / bootstrap_layouts.api.php
1 <?php
2
3 /**
4  * @file
5  * API hooks/callbacks for the Bootstrap Layouts module.
6  */
7
8 use Drupal\Component\Utility\Unicode;
9
10 /**
11  * Alters the list of available classes that can be used in Bootstrap layouts.
12  *
13  * @param array $classes
14  *   An associative array groups keyed by group machine name, containing
15  *   another associative array containing key/value pairs where the class
16  *   is the key and a human readable label is the the value.
17  * @param $groups
18  *   An associative array groups labels keyed by group machine name.
19  *
20  * @see \Drupal\bootstrap_layouts\BootstrapLayoutsManager::getClassOptions
21  */
22 function hook_bootstrap_layouts_class_options_alter(&$classes, &$groups) {
23   // Add theme specific classes.
24   $groups['my_theme'] = t('My Theme');
25   foreach (['top', 'middle', 'bottom'] as $style) {
26     $classes['my_theme']["section-$style"] = t('Section: @style', ['@style' => Unicode::ucfirst($style)]);
27   }
28 }