Commit 4a694010 authored by webchick's avatar webchick
Browse files

Issue #2002932 by zschmid, jastraat, vito_a | Dan Reinders: Rename Views...

Issue #2002932 by zschmid, jastraat, vito_a | Dan Reinders: Rename Views method value_form() to valueForm().
parent cbc907fa
...@@ -33,7 +33,7 @@ public function buildExposeForm(&$form, &$form_state) { ...@@ -33,7 +33,7 @@ public function buildExposeForm(&$form, &$form_state) {
unset($form['expose']['remember']); unset($form['expose']['remember']);
} }
function value_form(&$form, &$form_state) { protected function valueForm(&$form, &$form_state) {
// Only present a checkbox for the exposed filter itself. There's no way // Only present a checkbox for the exposed filter itself. There's no way
// to tell the difference between not checked and the default value, so // to tell the difference between not checked and the default value, so
// specifying the default value via the views UI is meaningless. // specifying the default value via the views UI is meaningless.
......
...@@ -63,7 +63,7 @@ function operator_form(&$form, &$form_state) { ...@@ -63,7 +63,7 @@ function operator_form(&$form, &$form_state) {
/** /**
* Provide a simple textfield for equality * Provide a simple textfield for equality
*/ */
function value_form(&$form, &$form_state) { protected function valueForm(&$form, &$form_state) {
$form['value'] = array( $form['value'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#size' => 15, '#size' => 15,
......
...@@ -95,7 +95,7 @@ public function buildExtraOptionsForm(&$form, &$form_state) { ...@@ -95,7 +95,7 @@ public function buildExtraOptionsForm(&$form, &$form_state) {
); );
} }
function value_form(&$form, &$form_state) { protected function valueForm(&$form, &$form_state) {
$vocabulary = entity_load('taxonomy_vocabulary', $this->options['vid']); $vocabulary = entity_load('taxonomy_vocabulary', $this->options['vid']);
if (empty($vocabulary) && $this->options['limit']) { if (empty($vocabulary) && $this->options['limit']) {
$form['markup'] = array( $form['markup'] = array(
......
...@@ -21,7 +21,7 @@ class Name extends InOperator { ...@@ -21,7 +21,7 @@ class Name extends InOperator {
var $always_multiple = TRUE; var $always_multiple = TRUE;
function value_form(&$form, &$form_state) { protected function valueForm(&$form, &$form_state) {
$values = array(); $values = array();
if ($this->value) { if ($this->value) {
$result = entity_load_multiple_by_properties('user', array('uid' => $this->value)); $result = entity_load_multiple_by_properties('user', array('uid' => $this->value));
......
...@@ -100,7 +100,7 @@ function operator_form(&$form, &$form_state) { ...@@ -100,7 +100,7 @@ function operator_form(&$form, &$form_state) {
$form['operator'] = array(); $form['operator'] = array();
} }
function value_form(&$form, &$form_state) { protected function valueForm(&$form, &$form_state) {
if (empty($this->value_options)) { if (empty($this->value_options)) {
// Initialize the array of possible values for this filter. // Initialize the array of possible values for this filter.
$this->getValueOptions(); $this->getValueOptions();
......
...@@ -30,7 +30,7 @@ protected function defineOptions() { ...@@ -30,7 +30,7 @@ protected function defineOptions() {
/** /**
* Add a type selector to the value form * Add a type selector to the value form
*/ */
function value_form(&$form, &$form_state) { protected function valueForm(&$form, &$form_state) {
if (empty($form_state['exposed'])) { if (empty($form_state['exposed'])) {
$form['value']['type'] = array( $form['value']['type'] = array(
'#type' => 'radios', '#type' => 'radios',
...@@ -42,7 +42,7 @@ function value_form(&$form, &$form_state) { ...@@ -42,7 +42,7 @@ function value_form(&$form, &$form_state) {
'#default_value' => !empty($this->value['type']) ? $this->value['type'] : 'date', '#default_value' => !empty($this->value['type']) ? $this->value['type'] : 'date',
); );
} }
parent::value_form($form, $form_state); parent::valueForm($form, $form_state);
} }
public function validateOptionsForm(&$form, &$form_state) { public function validateOptionsForm(&$form, &$form_state) {
......
...@@ -34,7 +34,7 @@ public function operatorOptions() { ...@@ -34,7 +34,7 @@ public function operatorOptions() {
/** /**
* Provide a simple textfield for equality * Provide a simple textfield for equality
*/ */
function value_form(&$form, &$form_state) { protected function valueForm(&$form, &$form_state) {
$form['value'] = array( $form['value'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Value'), '#title' => t('Value'),
......
...@@ -218,7 +218,7 @@ public function buildOptionsForm(&$form, &$form_state) { ...@@ -218,7 +218,7 @@ public function buildOptionsForm(&$form, &$form_state) {
else { else {
// Add the subform from operator_form(). // Add the subform from operator_form().
$this->showOperatorForm($form, $form_state); $this->showOperatorForm($form, $form_state);
// Add the subform from value_form(). // Add the subform from valueForm().
$this->show_value_form($form, $form_state); $this->show_value_form($form, $form_state);
$form['clear_markup_end'] = array( $form['clear_markup_end'] = array(
'#markup' => '</div>', '#markup' => '</div>',
...@@ -312,7 +312,7 @@ public function operatorSubmit($form, &$form_state) { } ...@@ -312,7 +312,7 @@ public function operatorSubmit($form, &$form_state) { }
* Shortcut to display the value form. * Shortcut to display the value form.
*/ */
function show_value_form(&$form, &$form_state) { function show_value_form(&$form, &$form_state) {
$this->value_form($form, $form_state); $this->valueForm($form, $form_state);
if (empty($this->no_operator)) { if (empty($this->no_operator)) {
$form['value']['#prefix'] = '<div class="views-group-box views-right-70">' . (isset($form['value']['#prefix']) ? $form['value']['#prefix'] : ''); $form['value']['#prefix'] = '<div class="views-group-box views-right-70">' . (isset($form['value']['#prefix']) ? $form['value']['#prefix'] : '');
$form['value']['#suffix'] = (isset($form['value']['#suffix']) ? $form['value']['#suffix'] : '') . '</div>'; $form['value']['#suffix'] = (isset($form['value']['#suffix']) ? $form['value']['#suffix'] : '') . '</div>';
...@@ -327,7 +327,7 @@ function show_value_form(&$form, &$form_state) { ...@@ -327,7 +327,7 @@ function show_value_form(&$form, &$form_state) {
* *
* @see buildOptionsForm() * @see buildOptionsForm()
*/ */
function value_form(&$form, &$form_state) { $form['value'] = array(); } protected function valueForm(&$form, &$form_state) { $form['value'] = array(); }
/** /**
* Validate the options form. * Validate the options form.
...@@ -802,7 +802,7 @@ public function buildExposedForm(&$form, &$form_state) { ...@@ -802,7 +802,7 @@ public function buildExposedForm(&$form, &$form_state) {
// Build the form and set the value based on the identifier. // Build the form and set the value based on the identifier.
if (!empty($this->options['expose']['identifier'])) { if (!empty($this->options['expose']['identifier'])) {
$value = $this->options['expose']['identifier']; $value = $this->options['expose']['identifier'];
$this->value_form($form, $form_state); $this->valueForm($form, $form_state);
$form[$value] = $form['value']; $form[$value] = $form['value'];
if (isset($form[$value]['#title']) && !empty($form[$value]['#type']) && $form[$value]['#type'] != 'checkbox') { if (isset($form[$value]['#title']) && !empty($form[$value]['#type']) && $form[$value]['#type'] != 'checkbox') {
...@@ -967,7 +967,7 @@ protected function buildExposedFiltersGroupForm(&$form, &$form_state) { ...@@ -967,7 +967,7 @@ protected function buildExposedFiltersGroupForm(&$form, &$form_state) {
// radios and they occupy a lot of space in a table row. // radios and they occupy a lot of space in a table row.
$row['operator']['#type'] = 'select'; $row['operator']['#type'] = 'select';
$row['operator']['#title'] = ''; $row['operator']['#title'] = '';
$this->value_form($row, $form_state); $this->valueForm($row, $form_state);
// Fix the dependencies to update value forms when operators // Fix the dependencies to update value forms when operators
// changes. This is needed because forms are inside a new form and // changes. This is needed because forms are inside a new form and
......
...@@ -164,7 +164,7 @@ function operator_values($values = 1) { ...@@ -164,7 +164,7 @@ function operator_values($values = 1) {
return $options; return $options;
} }
function value_form(&$form, &$form_state) { protected function valueForm(&$form, &$form_state) {
$form['value'] = array(); $form['value'] = array();
$options = array(); $options = array();
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* such as terms (many terms per node) or roles (many roles per user). * such as terms (many terms per node) or roles (many roles per user).
* *
* The construct method needs to be overridden to provide a list of options; * The construct method needs to be overridden to provide a list of options;
* alternately, the value_form and adminSummary methods need to be overriden * alternately, the valueForm and adminSummary methods need to be overriden
* to provide something that isn't just a select list. * to provide something that isn't just a select list.
* *
* @ingroup views_filter_handlers * @ingroup views_filter_handlers
...@@ -108,8 +108,8 @@ function operators() { ...@@ -108,8 +108,8 @@ function operators() {
} }
var $value_form_type = 'select'; var $value_form_type = 'select';
function value_form(&$form, &$form_state) { protected function valueForm(&$form, &$form_state) {
parent::value_form($form, $form_state); parent::valueForm($form, $form_state);
if (empty($form_state['exposed'])) { if (empty($form_state['exposed'])) {
$this->helper->buildOptionsForm($form, $form_state); $this->helper->buildOptionsForm($form, $form_state);
......
...@@ -145,7 +145,7 @@ function operator_values($values = 1) { ...@@ -145,7 +145,7 @@ function operator_values($values = 1) {
/** /**
* Provide a simple textfield for equality * Provide a simple textfield for equality
*/ */
function value_form(&$form, &$form_state) { protected function valueForm(&$form, &$form_state) {
$form['value']['#tree'] = TRUE; $form['value']['#tree'] = TRUE;
// We have to make some choices when creating this as an exposed // We have to make some choices when creating this as an exposed
......
...@@ -188,7 +188,7 @@ function operator_values($values = 1) { ...@@ -188,7 +188,7 @@ function operator_values($values = 1) {
/** /**
* Provide a simple textfield for equality * Provide a simple textfield for equality
*/ */
function value_form(&$form, &$form_state) { protected function valueForm(&$form, &$form_state) {
// We have to make some choices when creating this as an exposed // We have to make some choices when creating this as an exposed
// filter form. For example, if the operator is locked and thus // filter form. For example, if the operator is locked and thus
// not rendered, we can't render dependencies; instead we only // not rendered, we can't render dependencies; instead we only
......
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