4 * Contains \Drupal\bootstrap\Plugin\Preprocess\FormElementLabel.
7 namespace Drupal\bootstrap\Plugin\Preprocess;
9 use Drupal\bootstrap\Annotation\BootstrapPreprocess;
10 use Drupal\bootstrap\Utility\Element;
11 use Drupal\bootstrap\Utility\Variables;
14 * Pre-processes variables for the "form_element_label" theme hook.
16 * @ingroup plugins_preprocess
18 * @BootstrapPreprocess("form_element_label")
20 class FormElementLabel extends PreprocessBase implements PreprocessInterface {
25 public function preprocessElement(Element $element, Variables $variables) {
26 // Map the element properties.
27 $variables->map(['attributes', 'is_checkbox', 'is_radio']);
29 // Preprocess attributes.
30 $this->preprocessAttributes();