Skip to content
PHP Ecosystem
Explore

AssetPanel

API reference › Yii3 Debug › Panel › AssetPanel

final classYii3\Debug\Panel\AssetPanel
ExtendsProviderPanel
ImplementsToolbarPanelProviderInterface
Sourcesrc/Panel/AssetPanel.php

Adapts the framework-neutral PHPForge Asset Bundles panel to the Yii3 debugger.

MethodDescriptionDefined by
__construct()Binds the adapter to the shared Asset Bundles presentation.AssetPanel
hasContent()Reports whether the capture registered an asset bundle or a Vite build, the two things the panel describes.AssetPanel
icon()Returns the shared Debug Core icon key.ProviderPanel
id()Returns the stable identifier of this panel.ProviderPanel
name()Returns the human-readable panel name.ProviderPanel
render()Renders the detail content the provider produces for a capture.ProviderPanel
toolbarItems()Builds the toolbar metrics the provider declares for a capture.ProviderPanel
withMetadata()Returns a copy presenting the panel under the metadata the application configured.ProviderPanel
public function __construct()

Binds the adapter to the shared Asset Bundles presentation.

public function hasContent(array<string, mixed> $payload): bool

Reports whether the capture registered an asset bundle or a Vite build, the two things the panel describes.

A capture holding neither has nothing to show, so the navigation entry and the toolbar chip stay hidden instead of announcing a count of 0. The answer comes from the raw payload, so a malformed capture carrying a non-empty bundles or vite value stays listed and the detail page and the toolbar chip expose the hydration failure instead of hiding it.

Parameters

ParameterTypeDescription
$payloadarray<string, mixed>Serialized panel payload.

Returns

bool: true when a bundle or the Vite section was captured; false otherwise.