Skip to content
Snippets Groups Projects
Commit c06bf841 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2002934 by drupee, damiankloip, x.algorithm, kevin.reiss, heddn: Rename...

Issue #2002934 by drupee, damiankloip, x.algorithm, kevin.reiss, heddn: Rename Views method validate_argument() to validateArgument().
parent 0f480b9e
No related branches found
No related tags found
No related merge requests found
Showing with 10 additions and 10 deletions
......@@ -80,7 +80,7 @@ public function submitOptionsForm(&$form, &$form_state, &$options = array()) {
$options['types'] = array_filter($options['types']);
}
function validate_argument($argument) {
public function validateArgument($argument) {
$types = $this->options['types'];
switch ($this->options['nid_type']) {
......
......@@ -93,7 +93,7 @@ public function submitOptionsForm(&$form, &$form_state, &$options = array()) {
$options['vids'] = array_filter($options['vids']);
}
function validate_argument($argument) {
public function validateArgument($argument) {
$vocabularies = array_filter($this->options['vids']);
$type = $this->options['type'];
$transform = $this->options['transform'];
......
......@@ -72,7 +72,7 @@ public function submitOptionsForm(&$form, &$form_state, &$options = array()) {
$options['roles'] = array_filter($options['roles']);
}
function validate_argument($argument) {
public function validateArgument($argument) {
$type = $this->options['type'];
// is_numeric() can return false positives, so we ensure it's an integer.
// However, is_integer() will always fail, since $argument is a string.
......
......@@ -950,7 +950,7 @@ public function validateArgument($arg) {
}
$plugin = $this->getPlugin('argument_validator');
return $this->argument_validated = $plugin->validate_argument($arg);
return $this->argument_validated = $plugin->validateArgument($arg);
}
/**
......@@ -960,7 +960,7 @@ public function validateArgument($arg) {
* argument fails to validate, but there is an action to take anyway,
* then validation cannot actually fail.
*/
function validate_argument($arg) {
public function validateMenuArgument($arg) {
$validate_info = $this->defaultActions($this->options['validate']['fail']);
if (empty($validate_info['hard fail'])) {
return TRUE;
......
......@@ -80,7 +80,7 @@ protected function checkAccess(&$form, $option_name) {
}
}
function validate_argument($arg) { return TRUE; }
public function validateArgument($arg) { return TRUE; }
/**
* Process the summary arguments for displaying.
......
......@@ -22,7 +22,7 @@
*/
class None extends ArgumentValidatorPluginBase {
function validate_argument($argument) {
public function validateArgument($argument) {
if (!empty($this->argument->options['must_not_be'])) {
return !isset($argument);
}
......
......@@ -22,7 +22,7 @@
*/
class Numeric extends ArgumentValidatorPluginBase {
function validate_argument($argument) {
public function validateArgument($argument) {
return is_numeric($argument);
}
......
......@@ -49,7 +49,7 @@ public function access() {
return user_access('use PHP for settings');
}
function validate_argument($argument) {
public function validateArgument($argument) {
// set up variables to make it easier to reference during the argument.
$view = &$this->view;
$handler = &$this->argument;
......
......@@ -404,7 +404,7 @@ function views_arg_load($value, $name, $display_id, $index) {
if (isset($indexes[$index])) {
if (isset($view->argument[$indexes[$index]])) {
$arg = $view->argument[$indexes[$index]]->validate_argument($value) ? $value : FALSE;
$arg = $view->argument[$indexes[$index]]->validateMenuArgument($value) ? $value : FALSE;
$view->destroy();
// Store the output in case we load this same menu item again.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment