AssetPanel
API reference › Yii3 Debug › Panel › AssetPanel
Adapts the framework-neutral PHPForge Asset Bundles panel to the Yii3 debugger.
Methods
Section titled “Methods”| Method | Description | Defined 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 |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct()Binds the adapter to the shared Asset Bundles presentation.
hasContent()
Section titled “hasContent() ”public function hasContent(array<string, mixed> $payload): boolReports 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
| Parameter | Type | Description |
|---|---|---|
$payload | array<string, | Serialized panel payload. |
Returns
bool: true when a bundle or the Vite section was captured; false otherwise.