You are here

public function ArgumentPluginBase::defaultAction in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::defaultAction()

Handle the default action, which means our argument wasn't present.

Override this method only with extreme care.

Return value

A boolean value; if TRUE, continue building this view. If FALSE, building the view will be aborted here.

1 call to ArgumentPluginBase::defaultAction()
ArgumentPluginBase::validateFail in core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
How to act if validation fails.

File

core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php, line 701
Contains \Drupal\views\Plugin\views\argument\ArgumentPluginBase.

Class

ArgumentPluginBase
Base class for argument (contextual filter) handler plugins.

Namespace

Drupal\views\Plugin\views\argument

Code

public function defaultAction($info = NULL) {
  if (!isset($info)) {
    $info = $this
      ->defaultActions($this->options['default_action']);
  }
  if (!$info) {
    return FALSE;
  }
  if (!empty($info['method args'])) {
    return call_user_func_array(array(
      &$this,
      $info['method'],
    ), $info['method args']);
  }
  else {
    return $this
      ->{$info['method']}();
  }
}