MiniCartUtils
in package
Utility methods used for the Mini Cart block.
Table of Contents
- get_svg_icon() : string
- Get the SVG icon for the mini cart.
- migrate_attributes_to_color_panel() : array<string|int, mixed>
- Migrate attributes to color panel component format.
Methods
get_svg_icon()
Get the SVG icon for the mini cart.
public
static get_svg_icon(string $icon_name[, string $icon_color = 'currentColor' ]) : string
Parameters
- $icon_name : string
-
The name of the icon.
- $icon_color : string = 'currentColor'
-
The color of the icon.
Return values
string — The SVG icon.migrate_attributes_to_color_panel()
Migrate attributes to color panel component format.
public
static migrate_attributes_to_color_panel(array<string|int, mixed> $attributes) : array<string|int, mixed>
Parameters
- $attributes : array<string|int, mixed>
-
Any attributes that currently are available from the block.