Version 1
[yaffs-website] / web / themes / contrib / bootstrap / src / Plugin / Setting / General / Forms / FormsHasErrorValueToggle.php
1 <?php
2 /**
3  * @file
4  * Contains \Drupal\bootstrap\Plugin\Setting\General\Forms\FormsHasErrorValueToggle.
5  */
6
7 namespace Drupal\bootstrap\Plugin\Setting\General\Forms;
8
9 use Drupal\bootstrap\Annotation\BootstrapSetting;
10 use Drupal\bootstrap\Plugin\Setting\SettingBase;
11 use Drupal\Core\Annotation\Translation;
12
13 /**
14  * The "forms_has_error_value_toggle" theme setting.
15  *
16  * @ingroup plugins_setting
17  *
18  * @BootstrapSetting(
19  *   id = "forms_has_error_value_toggle",
20  *   type = "checkbox",
21  *   title = @Translation("Automatically remove error classes when values have been entered"),
22  *   description = @Translation("If an element has a <code>.has-error</code> class attached to it, enabling this will automatically remove that class when a value is entered."),
23  *   defaultValue = 1,
24  *   groups = {
25  *     "general" = @Translation("General"),
26  *     "forms" = @Translation("Forms"),
27  *   },
28  * )
29  */
30 class FormsHasErrorValueToggle extends SettingBase {
31
32   /**
33    * {@inheritdoc}
34    */
35   public function drupalSettings() {
36     return TRUE;
37   }
38
39 }