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. 10 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 call to ArgumentPluginBase::getDefaultArgument()
Date::getDefaultArgument in core/modules/views/src/Plugin/views/argument/Date.php
Set the empty argument value to the current date, formatted appropriately for this argument.
1 method overrides ArgumentPluginBase::getDefaultArgument()
Date::getDefaultArgument in core/modules/views/src/Plugin/views/argument/Date.php
Set the empty argument value to the current date, formatted appropriately for this argument.

File

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

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.