function InvokeCommand::__construct

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Ajax/InvokeCommand.php \Drupal\Core\Ajax\InvokeCommand::__construct()
  2. 10 core/lib/Drupal/Core/Ajax/InvokeCommand.php \Drupal\Core\Ajax\InvokeCommand::__construct()
  3. 9 core/lib/Drupal/Core/Ajax/InvokeCommand.php \Drupal\Core\Ajax\InvokeCommand::__construct()
  4. 8.9.x core/lib/Drupal/Core/Ajax/InvokeCommand.php \Drupal\Core\Ajax\InvokeCommand::__construct()

Constructs an InvokeCommand object.

Parameters

string $selector: A jQuery selector.

string $method: The name of a jQuery method to invoke.

array $arguments: An optional array of arguments to pass to the method.

File

core/lib/Drupal/Core/Ajax/InvokeCommand.php, line 30

Class

InvokeCommand
AJAX command for invoking an arbitrary jQuery method.

Namespace

Drupal\Core\Ajax

Code

public function __construct(protected $selector, protected $method, protected array $arguments = []) {
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.