Commit 86b2e89a authored by alexpott's avatar alexpott

Issue #2003464 by Dan Reinders, jfm2k1: Rename Views method operator_options()...

Issue #2003464 by Dan Reinders, jfm2k1: Rename Views method operator_options() to operatorOptions().
parent 29271d47
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
*/ */
class TaxonomyIndexTidDepth extends TaxonomyIndexTid { class TaxonomyIndexTidDepth extends TaxonomyIndexTid {
function operator_options($which = 'title') { public function operatorOptions($which = 'title') {
return array( return array(
'or' => t('Is one of'), 'or' => t('Is one of'),
); );
......
...@@ -24,7 +24,7 @@ class Equality extends FilterPluginBase { ...@@ -24,7 +24,7 @@ class Equality extends FilterPluginBase {
/** /**
* Provide simple equality operator * Provide simple equality operator
*/ */
function operator_options() { public function operatorOptions() {
return array( return array(
'=' => t('Is equal to'), '=' => t('Is equal to'),
'!=' => t('Is not equal to'), '!=' => t('Is not equal to'),
......
...@@ -176,7 +176,7 @@ public function canExpose() { return TRUE; } ...@@ -176,7 +176,7 @@ public function canExpose() { return TRUE; }
* Only exposed filters with operators available can be converted into groups. * Only exposed filters with operators available can be converted into groups.
*/ */
function can_build_group() { function can_build_group() {
return $this->isExposed() && (count($this->operator_options()) > 0); return $this->isExposed() && (count($this->operatorOptions()) > 0);
} }
/** /**
...@@ -280,7 +280,7 @@ public function showOperatorForm(&$form, &$form_state) { ...@@ -280,7 +280,7 @@ public function showOperatorForm(&$form, &$form_state) {
* @see buildOptionsForm() * @see buildOptionsForm()
*/ */
function operator_form(&$form, &$form_state) { function operator_form(&$form, &$form_state) {
$options = $this->operator_options(); $options = $this->operatorOptions();
if (!empty($options)) { if (!empty($options)) {
$form['operator'] = array( $form['operator'] = array(
'#type' => count($options) < 10 ? 'radios' : 'select', '#type' => count($options) < 10 ? 'radios' : 'select',
...@@ -295,7 +295,7 @@ function operator_form(&$form, &$form_state) { ...@@ -295,7 +295,7 @@ function operator_form(&$form, &$form_state) {
* Provide a list of options for the default operator form. * Provide a list of options for the default operator form.
* Should be overridden by classes that don't override operator_form * Should be overridden by classes that don't override operator_form
*/ */
function operator_options() { return array(); } public function operatorOptions() { return array(); }
/** /**
* Validate the operator form. * Validate the operator form.
......
...@@ -144,7 +144,7 @@ function operators() { ...@@ -144,7 +144,7 @@ function operators() {
/** /**
* Build strings from the operators() for 'select' options * Build strings from the operators() for 'select' options
*/ */
function operator_options($which = 'title') { public function operatorOptions($which = 'title') {
$options = array(); $options = array();
foreach ($this->operators() as $id => $info) { foreach ($this->operators() as $id => $info) {
$options[$id] = $info[$which]; $options[$id] = $info[$which];
......
...@@ -123,7 +123,7 @@ function operators() { ...@@ -123,7 +123,7 @@ function operators() {
/** /**
* Provide a list of all the numeric operators * Provide a list of all the numeric operators
*/ */
function operator_options($which = 'title') { public function operatorOptions($which = 'title') {
$options = array(); $options = array();
foreach ($this->operators() as $id => $info) { foreach ($this->operators() as $id => $info) {
$options[$id] = $info[$which]; $options[$id] = $info[$which];
...@@ -287,7 +287,7 @@ public function adminSummary() { ...@@ -287,7 +287,7 @@ public function adminSummary() {
return t('exposed'); return t('exposed');
} }
$options = $this->operator_options('short'); $options = $this->operatorOptions('short');
$output = check_plain($options[$this->operator]); $output = check_plain($options[$this->operator]);
if (in_array($this->operator, $this->operator_values(2))) { if (in_array($this->operator, $this->operator_values(2))) {
$output .= ' ' . t('@min and @max', array('@min' => $this->value['min'], '@max' => $this->value['max'])); $output .= ' ' . t('@min and @max', array('@min' => $this->value['min'], '@max' => $this->value['max']));
......
...@@ -146,7 +146,7 @@ function operators() { ...@@ -146,7 +146,7 @@ function operators() {
/** /**
* Build strings from the operators() for 'select' options * Build strings from the operators() for 'select' options
*/ */
function operator_options($which = 'title') { public function operatorOptions($which = 'title') {
$options = array(); $options = array();
foreach ($this->operators() as $id => $info) { foreach ($this->operators() as $id => $info) {
$options[$id] = $info[$which]; $options[$id] = $info[$which];
...@@ -163,7 +163,7 @@ public function adminSummary() { ...@@ -163,7 +163,7 @@ public function adminSummary() {
return t('exposed'); return t('exposed');
} }
$options = $this->operator_options('short'); $options = $this->operatorOptions('short');
$output = ''; $output = '';
if (!empty($options[$this->operator])) { if (!empty($options[$this->operator])) {
$output = check_plain($options[$this->operator]); $output = check_plain($options[$this->operator]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment