You are here

public function ScrollToElementCommand::__construct in Paragraphs Features 2.x

Same name and namespace in other branches
  1. 8 src/Ajax/ScrollToElementCommand.php \Drupal\paragraphs_features\Ajax\ScrollToElementCommand::__construct()

Constructs a ScrollToElementCommand object.

Parameters

string $elementSelector: The data-drupal-selector for the paragraphs element.

string $parentSelector: The data-drupal-selector for the paragraphs field.

File

src/Ajax/ScrollToElementCommand.php, line 36

Class

ScrollToElementCommand
Provides an AJAX command for scrolling an element into the view.

Namespace

Drupal\paragraphs_features\Ajax

Code

public function __construct(string $elementSelector, string $parentSelector) {
  $this->elementSelector = $elementSelector;
  $this->parentSelector = $parentSelector;
}