function ViewExecutable::setArguments

Same name and namespace in other branches
  1. 11.x core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::setArguments()
  2. 10 core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::setArguments()
  3. 8.9.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.

File

core/modules/views/src/ViewExecutable.php, line 498

Class

ViewExecutable
Represents a view as a whole.

Namespace

Drupal\views

Code

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.