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

Breadcrumb

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

interface CommandWithAttachedAssetsInterface

Interface for Ajax commands that render content and attach assets.

All Ajax commands that render HTML should implement these methods to be able to return attached assets to the calling AjaxResponse object.

Hierarchy

  • interface \Drupal\Core\Ajax\CommandWithAttachedAssetsInterface

Expanded class hierarchy of CommandWithAttachedAssetsInterface

All classes that implement CommandWithAttachedAssetsInterface

Related topics

Ajax API
Overview for Drupal's Ajax API.

File

core/lib/Drupal/Core/Ajax/CommandWithAttachedAssetsInterface.php, line 13

Namespace

Drupal\Core\Ajax
View source
interface CommandWithAttachedAssetsInterface {
    
    /**
     * Gets the attached assets.
     *
     * @return \Drupal\Core\Asset\AttachedAssets|null
     *   The attached assets for this command.
     */
    public function getAttachedAssets();

}

Members

Title Sort descending Modifiers Object type Summary Overrides
CommandWithAttachedAssetsInterface::getAttachedAssets public function Gets the attached assets. 3
RSS feed
Powered by Drupal