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

Breadcrumb

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

function AnnounceCommand::render

Overrides CommandInterface::render

File

core/lib/Drupal/Core/Ajax/AnnounceCommand.php, line 70

Class

AnnounceCommand
AJAX command for a JavaScript Drupal.announce() call.

Namespace

Drupal\Core\Ajax

Code

public function render() {
    $render = [
        'command' => 'announce',
        'text' => $this->text,
    ];
    if ($this->priority !== NULL) {
        $render['priority'] = $this->priority;
    }
    return $render;
}
RSS feed
Powered by Drupal