# AssetPanel

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

[API reference](/docs/api/index.md) › [Yii3 Debug](/docs/extensions/yii3-debug/reference/index.md) › [Panel](/docs/extensions/yii3-debug/reference/panel/index.md) › AssetPanel

| final class | `Yii3\Debug\Panel\AssetPanel` |
| --- | --- |
| Extends | [`ProviderPanel`](/docs/extensions/yii3-debug/reference/panel/providerpanel/index.md) |
| Implements | [`ToolbarPanelProviderInterface`](/docs/extensions/yii3-debug/reference/panel/toolbarpanelproviderinterface/index.md) |
| Source | [`src/Panel/AssetPanel.php`](https://github.com/yii3/debug/blob/main/src/Panel/AssetPanel.php#L10) |

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

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Binds the adapter to the shared Asset Bundles presentation. | `AssetPanel` |
| [`hasContent()`](#method-hasContent) | Reports whether the capture registered an asset bundle or a Vite build, the two things the panel describes. | `AssetPanel` |
| <span id="method-icon"></span>[`icon()`](/docs/extensions/yii3-debug/reference/panel/providerpanel/index.md#method-icon) | Returns the shared Debug Core icon key. | [`ProviderPanel`](/docs/extensions/yii3-debug/reference/panel/providerpanel/index.md) |
| <span id="method-id"></span>[`id()`](/docs/extensions/yii3-debug/reference/panel/providerpanel/index.md#method-id) | Returns the stable identifier of this panel. | [`ProviderPanel`](/docs/extensions/yii3-debug/reference/panel/providerpanel/index.md) |
| <span id="method-name"></span>[`name()`](/docs/extensions/yii3-debug/reference/panel/providerpanel/index.md#method-name) | Returns the human-readable panel name. | [`ProviderPanel`](/docs/extensions/yii3-debug/reference/panel/providerpanel/index.md) |
| <span id="method-render"></span>[`render()`](/docs/extensions/yii3-debug/reference/panel/providerpanel/index.md#method-render) | Renders the detail content the provider produces for a capture. | [`ProviderPanel`](/docs/extensions/yii3-debug/reference/panel/providerpanel/index.md) |
| <span id="method-toolbarItems"></span>[`toolbarItems()`](/docs/extensions/yii3-debug/reference/panel/providerpanel/index.md#method-toolbarItems) | Builds the toolbar metrics the provider declares for a capture. | [`ProviderPanel`](/docs/extensions/yii3-debug/reference/panel/providerpanel/index.md) |
| <span id="method-withMetadata"></span>[`withMetadata()`](/docs/extensions/yii3-debug/reference/panel/providerpanel/index.md#method-withMetadata) | Returns a copy presenting the panel under the metadata the application configured. | [`ProviderPanel`](/docs/extensions/yii3-debug/reference/panel/providerpanel/index.md) |

## Method details

### __construct() <span id="method-__construct"></span>

```php
public function __construct()
```

Binds the adapter to the shared Asset Bundles presentation.

### hasContent() <span id="method-hasContent"></span>

```php
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**

| Parameter | Type | Description |
| --- | --- | --- |
| `$payload` | `array<string, mixed>` | Serialized panel payload. |

**Returns**

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