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

Breadcrumb

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

function OpenDialogCommand::render

Implements \Drupal\Core\Ajax\CommandInterface:render().

Overrides CommandInterface::render

2 calls to OpenDialogCommand::render()
OpenOffCanvasDialogCommand::render in core/lib/Drupal/Core/Ajax/OpenOffCanvasDialogCommand.php
Implements \Drupal\Core\Ajax\CommandInterface:render().
OpenOffCanvasDialogCommand::render in core/lib/Drupal/Core/Ajax/OpenOffCanvasDialogCommand.php
Implements \Drupal\Core\Ajax\CommandInterface:render().
1 method overrides OpenDialogCommand::render()
OpenOffCanvasDialogCommand::render in core/lib/Drupal/Core/Ajax/OpenOffCanvasDialogCommand.php
Implements \Drupal\Core\Ajax\CommandInterface:render().

File

core/lib/Drupal/Core/Ajax/OpenDialogCommand.php, line 137

Class

OpenDialogCommand
Defines an AJAX command to open certain content in a dialog.

Namespace

Drupal\Core\Ajax

Code

public function render() {
    // For consistency ensure the modal option is set to TRUE or FALSE.
    $this->dialogOptions['modal'] = isset($this->dialogOptions['modal']) && $this->dialogOptions['modal'];
    return [
        'command' => 'openDialog',
        'selector' => $this->selector,
        'settings' => $this->settings,
        'data' => $this->getRenderedContent(),
        'dialogOptions' => $this->dialogOptions,
    ];
}
RSS feed
Powered by Drupal