Documentation
IPS_GetIcons
array IPS_GetIcons ()
Returns
An array with the icons grouped by skin. The structure is listed in the description.
Description
This function is intended for internal use only and may change or be removed at any time without notice.
The function returns all available icons in one call. The keys of the array are the names of the skins, the values are arrays which map the name of each icon to the Base64 encoded file content.
| Key | Content |
|---|---|
| "" (empty) | The icons of Symcon as Base64 encoded SVG files. The sub icons of adaptive icons (name with "-") are not included |
| Name of the skin | The icons of the installed skin as Base64 encoded PNG files |
The function is intended to be called through the JSON-RPC interface, e.g. for the display in the console. It is not available in PHP scripts.
If the core instance "Skin Control" or "Util Control" is missing, the function fails with "Cannot find skin control" or "Cannot find util control". If the icons of a skin cannot be read, it fails with "Cannot load Icons for Skin ...: ...".
Example
// Show the number of icons per skin via the JSON-RPC interface
$rpc = new JSONRPC("http://user:password@127.0.0.1:3777/api/");
foreach ($rpc->IPS_GetIcons() as $skin => $icons) {
printf("%s: %d icons\n", $skin == '' ? 'Symcon' : $skin, count($icons));
}
/* e.g. returns:
Symcon: 165 icons
*/