diff --git a/core/modules/views/src/Plugin/views/filter/BooleanOperator.php b/core/modules/views/src/Plugin/views/filter/BooleanOperator.php index 47c473e..9f2b7f8 100644 --- a/core/modules/views/src/Plugin/views/filter/BooleanOperator.php +++ b/core/modules/views/src/Plugin/views/filter/BooleanOperator.php @@ -137,7 +137,7 @@ protected function valueForm(&$form, FormStateInterface $formState) { // Initialize the array of possible values for this filter. $this->getValueOptions(); } - if (!empty($form_state['exposed'])) { + if (!empty($formState['exposed'])) { // Exposed filter: use a select box to save space. $filter_form_type = 'select'; } @@ -153,21 +153,21 @@ protected function valueForm(&$form, FormStateInterface $formState) { ); if (!empty($this->options['exposed'])) { $identifier = $this->options['expose']['identifier']; - $user_input = $form_state->getUserInput(); - if (!empty($form_state['exposed']) && !isset($user_input[$identifier])) { + $user_input = $formState->getUserInput(); + if (!empty($formState['exposed']) && !isset($user_input[$identifier])) { $user_input[$identifier] = $this->value; - $form_state->setUserInput($user_input); + $formState->setUserInput($user_input); } // If we're configuring an exposed filter, add an - Any - option. - if (empty($form_state['exposed']) || empty($this->options['expose']['required'])) { + if (empty($formState['exposed']) || empty($this->options['expose']['required'])) { $form['value']['#options'] = array('All' => t('- Any -')) + $form['value']['#options']; } } } - protected function valueValidate($form, FormStateInterface $form_state) { - if ($form_state->getValue(array('options', 'value')) == 'All' && !$form_state->isValueEmpty(array('options', 'expose', 'required'))) { - $form_state->setErrorByName('value', t('You must select a value unless this is an non-required exposed filter.')); + protected function valueValidate($form, FormStateInterface $formState) { + if ($formState->getValue(array('options', 'value')) == 'All' && !$formState->isValueEmpty(array('options', 'expose', 'required'))) { + $formState->setErrorByName('value', t('You must select a value unless this is an non-required exposed filter.')); } }