You are here

public function AnnounceCommand::getAttachedAssets in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Ajax/AnnounceCommand.php \Drupal\Core\Ajax\AnnounceCommand::getAttachedAssets()
  2. 9 core/lib/Drupal/Core/Ajax/AnnounceCommand.php \Drupal\Core\Ajax\AnnounceCommand::getAttachedAssets()

File

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

Class

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

Namespace

Drupal\Core\Ajax

Code

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