Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ScrollTopCommand.php

function ScrollTopCommand::render

Overrides CommandInterface::render

File

core/lib/Drupal/Core/Ajax/ScrollTopCommand.php, line 32

Class

ScrollTopCommand
Provides an AJAX command for scrolling to the top of an element.

Namespace

Drupal\Core\Ajax

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal