3 namespace Drupal\bootstrap\Plugin\Preprocess;
5 use Drupal\bootstrap\Utility\Element;
6 use Drupal\bootstrap\Utility\Variables;
9 * Pre-processes variables for the "form_element_label" theme hook.
11 * @ingroup plugins_preprocess
13 * @BootstrapPreprocess("form_element_label")
15 class FormElementLabel extends PreprocessBase implements PreprocessInterface {
20 public function preprocessElement(Element $element, Variables $variables) {
21 // Map the element properties.
22 $variables->map(['attributes', 'is_checkbox', 'is_radio']);
24 // Preprocess attributes.
25 $this->preprocessAttributes();