You are here

public function WebformScrollTopCommand::render in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Ajax/WebformScrollTopCommand.php \Drupal\webform\Ajax\WebformScrollTopCommand::render()

Return an array to be run through json_encode and sent to the client.

Overrides CommandInterface::render

File

src/Ajax/WebformScrollTopCommand.php, line 44

Class

WebformScrollTopCommand
Provides an Ajax command for scrolling to the top of an element.

Namespace

Drupal\webform\Ajax

Code

public function render() {
  return [
    'command' => 'webformScrollTop',
    'selector' => $this->selector,
    'target' => $this->target,
  ];
}