You are here

public function ViewExecutable::setArguments in Drupal 9

Same name and namespace in other branches
  1. 8 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 494

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);
}