summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2013-06-12 15:20:00 (GMT)
committerAlex Pott2013-06-12 15:20:00 (GMT)
commitc06bf841a6787ed8832e0c164d8b9e26350eddec (patch)
tree51d93a12be9a159add0564578621b161dc2c90c6
parent0f480b9e06222c9764bca665220e05adbc4f69fd (diff)
Issue #2002934 by drupee, damiankloip, x.algorithm, kevin.reiss, heddn: Rename Views method validate_argument() to validateArgument().
-rw-r--r--core/modules/node/lib/Drupal/node/Plugin/views/argument_validator/Node.php2
-rw-r--r--core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_validator/Term.php2
-rw-r--r--core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php4
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/None.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Numeric.php2
-rw-r--r--core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Php.php2
-rw-r--r--core/modules/views/views.module2
9 files changed, 10 insertions, 10 deletions
diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/argument_validator/Node.php b/core/modules/node/lib/Drupal/node/Plugin/views/argument_validator/Node.php
index a2b8b63..0234629 100644
--- a/core/modules/node/lib/Drupal/node/Plugin/views/argument_validator/Node.php
+++ b/core/modules/node/lib/Drupal/node/Plugin/views/argument_validator/Node.php
@@ -80,7 +80,7 @@ class Node extends ArgumentValidatorPluginBase {
$options['types'] = array_filter($options['types']);
}
- function validate_argument($argument) {
+ public function validateArgument($argument) {
$types = $this->options['types'];
switch ($this->options['nid_type']) {
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_validator/Term.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_validator/Term.php
index b93aa87..7491199 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_validator/Term.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument_validator/Term.php
@@ -93,7 +93,7 @@ class Term extends ArgumentValidatorPluginBase {
$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'];
diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php b/core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php
index cc518c3..764efde 100644
--- a/core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php
+++ b/core/modules/user/lib/Drupal/user/Plugin/views/argument_validator/User.php
@@ -72,7 +72,7 @@ class User extends ArgumentValidatorPluginBase {
$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.
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
index dd86190..4974380 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
@@ -950,7 +950,7 @@ abstract class ArgumentPluginBase extends HandlerBase {
}
$plugin = $this->getPlugin('argument_validator');
- return $this->argument_validated = $plugin->validate_argument($arg);
+ return $this->argument_validated = $plugin->validateArgument($arg);
}
/**
@@ -960,7 +960,7 @@ abstract class ArgumentPluginBase extends HandlerBase {
* 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;
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php
index e7945dc..af7f12c 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php
@@ -80,7 +80,7 @@ abstract class ArgumentValidatorPluginBase extends PluginBase {
}
}
- function validate_argument($arg) { return TRUE; }
+ public function validateArgument($arg) { return TRUE; }
/**
* Process the summary arguments for displaying.
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/None.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/None.php
index 7a63069..c8aa8eb 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/None.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/None.php
@@ -22,7 +22,7 @@ use Drupal\Core\Annotation\Translation;
*/
class None extends ArgumentValidatorPluginBase {
- function validate_argument($argument) {
+ public function validateArgument($argument) {
if (!empty($this->argument->options['must_not_be'])) {
return !isset($argument);
}
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Numeric.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Numeric.php
index 6db339e..05b7845 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Numeric.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Numeric.php
@@ -22,7 +22,7 @@ use Drupal\Core\Annotation\Translation;
*/
class Numeric extends ArgumentValidatorPluginBase {
- function validate_argument($argument) {
+ public function validateArgument($argument) {
return is_numeric($argument);
}
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Php.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Php.php
index dc16a1c..138a1df 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Php.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Php.php
@@ -49,7 +49,7 @@ class Php extends ArgumentValidatorPluginBase {
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;
diff --git a/core/modules/views/views.module b/core/modules/views/views.module
index d755506..4d656b6 100644
--- a/core/modules/views/views.module
+++ b/core/modules/views/views.module
@@ -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.