Version 1
[yaffs-website] / web / themes / contrib / bootstrap / src / Plugin / Form / SearchBlockForm.php
1 <?php
2 /**
3  * @file
4  * Contains \Drupal\bootstrap\Plugin\Form\SearchBlockForm.
5  */
6
7 namespace Drupal\bootstrap\Plugin\Form;
8
9 use Drupal\bootstrap\Annotation\BootstrapForm;
10 use Drupal\bootstrap\Utility\Element;
11 use Drupal\Core\Form\FormStateInterface;
12
13 /**
14  * Implements hook_form_FORM_ID_alter().
15  *
16  * @ingroup plugins_form
17  *
18  * @BootstrapForm("search_block_form")
19  */
20 class SearchBlockForm extends FormBase {
21
22   /**
23    * {@inheritdoc}
24    */
25   public function alterFormElement(Element $form, FormStateInterface $form_state, $form_id = NULL) {
26     $form->actions->submit->setProperty('icon_only', TRUE);
27     $form->keys->setProperty('input_group_button', TRUE);
28   }
29
30 }