file Actions.php

Namespace

Drupal\bootstrap\Plugin\Process
  1. <?php
  2. namespace Drupal\bootstrap\Plugin\Process;
  3. use Drupal\bootstrap\Utility\Element;
  4. use Drupal\Core\Form\FormStateInterface;
  5. /**
  6. * Processes the "actions" element.
  7. *
  8. * @ingroup plugins_process
  9. *
  10. * @BootstrapProcess("actions")
  11. */
  12. class Actions extends ProcessBase implements ProcessInterface {
  13. /**
  14. * {@inheritdoc}
  15. */
  16. public static function processElement(Element $element, FormStateInterface $form_state, array &$complete_form) {
  17. foreach ($element->children() as $child) {
  18. if ($child->isPropertyEmpty('icon')) {
  19. $child->setIcon();
  20. }
  21. }
  22. }
  23. }

Classes

Name Description
Actions Processes the "actions" element.