Commit f1ba4094 authored by alexpott's avatar alexpott
Browse files

Issue #2002894 by crowdcg, jibran: Rename Views method get_argument() to getArgument().

parent 1bf078e7
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
*/ */
class Node extends ArgumentDefaultPluginBase { class Node extends ArgumentDefaultPluginBase {
function get_argument() { public function getArgument() {
foreach (range(1, 3) as $i) { foreach (range(1, 3) as $i) {
$node = menu_get_object('node', $i); $node = menu_get_object('node', $i);
if (!empty($node)) { if (!empty($node)) {
......
...@@ -117,7 +117,7 @@ public function submitOptionsForm(&$form, &$form_state, &$options = array()) { ...@@ -117,7 +117,7 @@ public function submitOptionsForm(&$form, &$form_state, &$options = array()) {
$options['vids'] = array_filter($options['vids']); $options['vids'] = array_filter($options['vids']);
} }
function get_argument() { public function getArgument() {
// Load default argument from taxonomy page. // Load default argument from taxonomy page.
if (!empty($this->options['term_page'])) { if (!empty($this->options['term_page'])) {
if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2))) { if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2))) {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
*/ */
class CurrentUser extends ArgumentDefaultPluginBase { class CurrentUser extends ArgumentDefaultPluginBase {
function get_argument() { public function getArgument() {
global $user; global $user;
return $user->uid; return $user->uid;
} }
......
...@@ -37,7 +37,7 @@ public function buildOptionsForm(&$form, &$form_state) { ...@@ -37,7 +37,7 @@ public function buildOptionsForm(&$form, &$form_state) {
); );
} }
function get_argument() { public function getArgument() {
foreach (range(1, 3) as $i) { foreach (range(1, 3) as $i) {
$user = menu_get_object('user', $i); $user = menu_get_object('user', $i);
if (!empty($user)) { if (!empty($user)) {
......
...@@ -744,7 +744,7 @@ function hasDefaultArgument() { ...@@ -744,7 +744,7 @@ function hasDefaultArgument() {
public function getDefaultArgument() { public function getDefaultArgument() {
$plugin = $this->getPlugin('argument_default'); $plugin = $this->getPlugin('argument_default');
if ($plugin) { if ($plugin) {
return $plugin->get_argument(); return $plugin->getArgument();
} }
} }
......
...@@ -34,7 +34,7 @@ abstract class ArgumentDefaultPluginBase extends PluginBase { ...@@ -34,7 +34,7 @@ abstract class ArgumentDefaultPluginBase extends PluginBase {
* *
* This needs to be overridden by every default argument handler to properly do what is needed. * This needs to be overridden by every default argument handler to properly do what is needed.
*/ */
function get_argument() { } public function getArgument() { }
/** /**
* Sets the parent argument this plugin is associated with. * Sets the parent argument this plugin is associated with.
......
...@@ -41,7 +41,7 @@ public function buildOptionsForm(&$form, &$form_state) { ...@@ -41,7 +41,7 @@ public function buildOptionsForm(&$form, &$form_state) {
/** /**
* Return the default argument. * Return the default argument.
*/ */
function get_argument() { public function getArgument() {
return $this->options['argument']; return $this->options['argument'];
} }
......
...@@ -50,7 +50,7 @@ public function access() { ...@@ -50,7 +50,7 @@ public function access() {
return user_access('use PHP for settings'); return user_access('use PHP for settings');
} }
function get_argument() { public function getArgument() {
// set up variables to make it easier to reference during the argument. // set up variables to make it easier to reference during the argument.
$view = &$this->view; $view = &$this->view;
$argument = &$this->argument; $argument = &$this->argument;
......
...@@ -49,7 +49,7 @@ public function buildOptionsForm(&$form, &$form_state) { ...@@ -49,7 +49,7 @@ public function buildOptionsForm(&$form, &$form_state) {
); );
} }
function get_argument() { public function getArgument() {
$path = NULL; $path = NULL;
if ($this->options['use_alias']) { if ($this->options['use_alias']) {
$path = drupal_get_path_alias(); $path = drupal_get_path_alias();
......
...@@ -32,9 +32,9 @@ protected function defineOptions() { ...@@ -32,9 +32,9 @@ protected function defineOptions() {
} }
/** /**
* Overrides Drupal\views\Plugin\views\argument_default\ArgumentDefaultPluginBase::get_argument(). * {@inheritdoc}
*/ */
public function get_argument() { public function getArgument() {
return $this->options['value']; return $this->options['value'];
} }
......
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