function ArgumentPluginBase::getDefaultArgument

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::getDefaultArgument()
  2. 8.9.x core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::getDefaultArgument()
  3. 11.x core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php \Drupal\views\Plugin\views\argument\ArgumentPluginBase::getDefaultArgument()

Get a default argument, if available.

1 method overrides ArgumentPluginBase::getDefaultArgument()
Date::getDefaultArgument in core/modules/views/src/Plugin/views/argument/Date.php
Gets the date default argument, formatted appropriately for this argument.

File

core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php, line 852

Class

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

Namespace

Drupal\views\Plugin\views\argument

Code

public function getDefaultArgument() {
    $plugin = $this->getPlugin('argument_default');
    if ($plugin) {
        return $plugin->getArgument();
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.