Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ArgumentPluginBase.php

function ArgumentPluginBase::defaultAction

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

Override this method only with extreme care.

Return value

bool 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 762

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([
            &$this,
            $info['method'],
        ], $info['method args']);
    }
    else {
        return $this->{$info['method']}();
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal