Icon
API reference › Debug Core › Helper › Icon
Renders SVG icons bundled with the debug extension via Svg::tag().
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
render() static | Returns the rendered SVG markup for the given icon name, or an empty string when the file does not exist. | Icon |
Constants
Section titled “Constants”| Constant | Value | Description | Defined by |
|---|---|---|---|
KEY_PATTERN | '/\ | Shape an icon key must match: lowercase alphanumerics and hyphens, starting with an alphanumeric. | Icon |
Method details
Section titled “Method details”render()
Section titled “render() ”public static function render(string $name): stringReturns the rendered SVG markup for the given icon name, or an empty string when the file does not exist.
Parameters
| Parameter | Type | Description |
|---|---|---|
$name | string | Icon basename without the .svg extension (for example, chevron-down). |
Returns
string: Sanitized SVG markup, or '' when the source file is missing.