diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/filter/InOperator.php b/core/modules/views/lib/Drupal/views/Plugin/views/filter/InOperator.php index eaf564c..c37bd48 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/filter/InOperator.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/filter/InOperator.php @@ -153,7 +153,7 @@ public function operatorOptions($which = 'title') { return $options; } - function operator_values($values = 1) { + protected function operatorValues($values = 1) { $options = array(); foreach ($this->operators() as $id => $info) { if (isset($info['values']) && $info['values'] == $values) { @@ -186,7 +186,7 @@ function value_form(&$form, &$form_state) { if (empty($this->options['expose']['use_operator']) || empty($this->options['expose']['operator_id'])) { // exposed and locked. - $which = in_array($this->operator, $this->operator_values(1)) ? 'value' : 'none'; + $which = in_array($this->operator, $this->operatorValues(1)) ? 'value' : 'none'; } else { $source = ':input[name="' . $this->options['expose']['operator_id'] . '"]'; @@ -235,7 +235,7 @@ function value_form(&$form, &$form_state) { $form['value']['#suffix'] = ''; } // Setup #states for all operators with one value. - foreach ($this->operator_values(1) as $operator) { + foreach ($this->operatorValues(1) as $operator) { $form['value']['#states']['visible'][] = array( $source => array('value' => $operator), ); @@ -324,7 +324,7 @@ public function adminSummary() { $operator = check_plain($info[$this->operator]['short']); $values = ''; - if (in_array($this->operator, $this->operator_values(1))) { + if (in_array($this->operator, $this->operatorValues(1))) { // Remove every element which is not known. foreach ($this->value as $value) { if (!isset($this->value_options[$value])) { @@ -405,11 +405,11 @@ public function validate() { // If the operator is an operator which doesn't require a value, there is // no need for additional validation. - if (in_array($this->operator, $this->operator_values(0))) { + if (in_array($this->operator, $this->operatorValues(0))) { return array(); } - if (!in_array($this->operator, $this->operator_values(1))) { + if (!in_array($this->operator, $this->operatorValues(1))) { $errors[] = t('The operator is invalid on filter: @filter.', array('@filter' => $this->adminLabel(TRUE))); } if (is_array($this->value)) { diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/filter/Numeric.php b/core/modules/views/lib/Drupal/views/Plugin/views/filter/Numeric.php index c9d5389..2a97c25 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/filter/Numeric.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/filter/Numeric.php @@ -132,7 +132,7 @@ public function operatorOptions($which = 'title') { return $options; } - function operator_values($values = 1) { + protected function operatorValues($values = 1) { $options = array(); foreach ($this->operators() as $id => $info) { if ($info['values'] == $values) { @@ -162,7 +162,7 @@ function value_form(&$form, &$form_state) { if (empty($this->options['expose']['use_operator']) || empty($this->options['expose']['operator_id'])) { // exposed and locked. - $which = in_array($this->operator, $this->operator_values(2)) ? 'minmax' : 'value'; + $which = in_array($this->operator, $this->operatorValues(2)) ? 'minmax' : 'value'; } else { $source = ':input[name="' . $this->options['expose']['operator_id'] . '"]'; @@ -177,7 +177,7 @@ function value_form(&$form, &$form_state) { '#default_value' => $this->value['value'], ); // Setup #states for all operators with one value. - foreach ($this->operator_values(1) as $operator) { + foreach ($this->operatorValues(1) as $operator) { $form['value']['value']['#states']['visible'][] = array( $source => array('value' => $operator), ); @@ -216,7 +216,7 @@ function value_form(&$form, &$form_state) { if ($which == 'all') { $states = array(); // Setup #states for all operators with two values. - foreach ($this->operator_values(2) as $operator) { + foreach ($this->operatorValues(2) as $operator) { $states['#states']['visible'][] = array( $source => array('value' => $operator), ); @@ -289,10 +289,10 @@ public function adminSummary() { $options = $this->operatorOptions('short'); $output = check_plain($options[$this->operator]); - if (in_array($this->operator, $this->operator_values(2))) { + if (in_array($this->operator, $this->operatorValues(2))) { $output .= ' ' . t('@min and @max', array('@min' => $this->value['min'], '@max' => $this->value['max'])); } - elseif (in_array($this->operator, $this->operator_values(1))) { + elseif (in_array($this->operator, $this->operatorValues(1))) { $output .= ' ' . check_plain($this->value['value']); } return $output; diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/filter/String.php b/core/modules/views/lib/Drupal/views/Plugin/views/filter/String.php index c71e14b..f94e966 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/filter/String.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/filter/String.php @@ -168,13 +168,13 @@ public function adminSummary() { if (!empty($options[$this->operator])) { $output = check_plain($options[$this->operator]); } - if (in_array($this->operator, $this->operator_values(1))) { + if (in_array($this->operator, $this->operatorValues(1))) { $output .= ' ' . check_plain($this->value); } return $output; } - function operator_values($values = 1) { + protected function operatorValues($values = 1) { $options = array(); foreach ($this->operators() as $id => $info) { if (isset($info['values']) && $info['values'] == $values) { @@ -202,7 +202,7 @@ function value_form(&$form, &$form_state) { if (empty($this->options['expose']['use_operator']) || empty($this->options['expose']['operator_id'])) { // exposed and locked. - $which = in_array($this->operator, $this->operator_values(1)) ? 'value' : 'none'; + $which = in_array($this->operator, $this->operatorValues(1)) ? 'value' : 'none'; } else { $source = ':input[name="' . $this->options['expose']['operator_id'] . '"]'; @@ -222,7 +222,7 @@ function value_form(&$form, &$form_state) { if ($which == 'all') { // Setup #states for all operators with one value. - foreach ($this->operator_values(1) as $operator) { + foreach ($this->operatorValues(1) as $operator) { $form['value']['#states']['visible'][] = array( $source => array('value' => $operator), );