public function Node::getArgument in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/node/src/Plugin/views/argument_default/Node.php \Drupal\node\Plugin\views\argument_default\Node::getArgument()
Return the default argument.
This needs to be overridden by every default argument handler to properly do what is needed.
Overrides ArgumentDefaultPluginBase::getArgument
File
- core/
modules/ node/ src/ Plugin/ views/ argument_default/ Node.php, line 70 - Contains \Drupal\node\Plugin\views\argument_default\Node.
Class
- Node
- Default argument plugin to extract a node.
Namespace
Drupal\node\Plugin\views\argument_defaultCode
public function getArgument() {
if (($node = $this->routeMatch
->getParameter('node')) && $node instanceof NodeInterface) {
return $node
->id();
}
}