public function ScrollToElementCommand::render in Paragraphs Features 8
Same name and namespace in other branches
- 2.x src/Ajax/ScrollToElementCommand.php \Drupal\paragraphs_features\Ajax\ScrollToElementCommand::render()
Return an array to be run through json_encode and sent to the client.
Overrides CommandInterface::render
File
- src/
Ajax/ ScrollToElementCommand.php, line 44
Class
- ScrollToElementCommand
- Provides an AJAX command for scrolling an element into the view.
Namespace
Drupal\paragraphs_features\AjaxCode
public function render() {
return [
'command' => 'scrollToElement',
'drupalElementSelector' => $this->elementSelector,
'drupalParentSelector' => $this->parentSelector,
];
}