-
Notifications
You must be signed in to change notification settings - Fork 1
SVG_Icons
This class is in charge of displaying SVG icons across the site.
Place each source on its own array key, without adding either
the width
or height
attributes, since these are added dynamically,
before rendering the SVG code.
All icons are assumed to have equal width and height, hence the option
to only specify a $size
parameter in the svg methods.
- Full name:
\SVG_Icons
User Interface icons – svg sources.
protected static array $icons
- This property is static.
Social Icons – svg sources.
protected static array $social_icons
- This property is static.
Social Icons – domain mappings.
protected static array $social_icons_map
By default, each Icon ID is matched against a .com TLD. To override this behavior, specify all the domains it covers (including the .com TLD too, if applicable).
- This property is static.
Gets the SVG code for a given icon.
public static get_svg(string $group, string $icon, int $size): string
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$group |
string | the icon group. |
$icon |
string | The icon. |
$size |
int | The icon-size in pixels. |
Detects the social network from a URL and returns the SVG code for its icon.
public static get_social_link_svg(string $uri, int $size): string|null
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$uri |
string | Social link. |
$size |
int | The icon-size in pixels. |
Automatically generated from source code comments on 2024-07-17 using phpDocumentor and saggre/phpdocumentor-markdown