4 * Contains \Drupal\bootstrap\Plugin\Setting\Advanced\SuppressDeprecatedWarnings.
7 namespace Drupal\bootstrap\Plugin\Setting\Advanced;
9 use Drupal\bootstrap\Annotation\BootstrapSetting;
10 use Drupal\bootstrap\Plugin\Setting\SettingBase;
11 use Drupal\bootstrap\Utility\Element;
12 use Drupal\Core\Annotation\Translation;
13 use Drupal\Core\Form\FormStateInterface;
16 * The "suppress_deprecated_warnings" theme setting.
18 * @ingroup plugins_setting
21 * id = "suppress_deprecated_warnings",
24 * title = @Translation("Suppress deprecated warnings"),
26 * description = @Translation("Enable this setting if you wish to suppress deprecated warning messages. <strong class='error text-error'>WARNING: Suppressing these messages does not "e;fix"e; the problem and you will inevitably encounter issues when they are removed in future updates. Only use this setting in extreme and necessary circumstances.</strong>"),
28 * "advanced" = @Translation("Advanced"),
32 class SuppressDeprecatedWarnings extends SettingBase {
37 public function alterFormElement(Element $form, FormStateInterface $form_state, $form_id = NULL) {
38 $setting = $this->getSettingElement($form, $form_state);
39 $setting->setProperty('states', [
41 ':input[name="include_deprecated"]' => ['checked' => TRUE],