function ViewExecutable::setArguments
Same name in other branches
- 8.9.x core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::setArguments()
- 10 core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::setArguments()
- 11.x core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::setArguments()
Sets the arguments for the view.
Parameters
array $args: The arguments passed to the view.
2 calls to ViewExecutable::setArguments()
- ViewExecutable::preExecute in core/
modules/ views/ src/ ViewExecutable.php - Runs attachments and lets the display do what it needs to before running.
- ViewExecutable::__wakeup in core/
modules/ views/ src/ ViewExecutable.php - Magic method implementation to unserialize the view executable.
File
-
core/
modules/ views/ src/ ViewExecutable.php, line 498
Class
- ViewExecutable
- Represents a view as a whole.
Namespace
Drupal\viewsCode
public function setArguments(array $args) {
// The array keys of the arguments will be incorrect if set by
// views_embed_view() or \Drupal\views\ViewExecutable:preview().
$this->args = array_values($args);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.