function MessageCommand::getAttachedAssets

Same name in other branches
  1. 9 core/lib/Drupal/Core/Ajax/MessageCommand.php \Drupal\Core\Ajax\MessageCommand::getAttachedAssets()
  2. 8.9.x core/lib/Drupal/Core/Ajax/MessageCommand.php \Drupal\Core\Ajax\MessageCommand::getAttachedAssets()
  3. 11.x core/lib/Drupal/Core/Ajax/MessageCommand.php \Drupal\Core\Ajax\MessageCommand::getAttachedAssets()

Overrides CommandWithAttachedAssetsInterface::getAttachedAssets

File

core/lib/Drupal/Core/Ajax/MessageCommand.php, line 133

Class

MessageCommand
AJAX command for a JavaScript Drupal.message() call.

Namespace

Drupal\Core\Ajax

Code

public function getAttachedAssets() {
    $assets = new AttachedAssets();
    $assets->setLibraries([
        'core/drupal.message',
    ]);
    return $assets;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.