trait CommandWithAttachedAssetsTrait (View source)

Trait for Ajax commands that render content and attach assets.

Properties

protected AttachedAssets $attachedAssets

The attached assets for this Ajax command.

Methods

getRenderedContent()

Processes the content for output.

getAttachedAssets()

Gets the attached assets.

Details

protected string|MarkupInterface getRenderedContent()

Processes the content for output.

If content is a render array, it may contain attached assets to be processed.

Return Value

string|MarkupInterface

HTML rendered content.

AttachedAssets|null getAttachedAssets()

Gets the attached assets.

Return Value

AttachedAssets|null

The attached assets for this command.