« Back to Product

Documentation

UC_GetIconList

 array UC_GetIconList (int $InstanceID) 

Parameters

InstanceID

ID for the Util Control

Returns

An array with the names of the icons (without file extension).

Description

The function returns the names of all icons that come with IP-Symcon. For this purpose, the SVG files in the directory "webfront/img/icons" of the installation are read. The names can be used e.g. with IPS_SetIcon. The sub-icons of adaptive icons (name with "-", e.g. "Battery-50") are not included. The order of the entries is not defined. If the directory does not exist, the result is an empty array.

The icons including their content and the icons of the skins are returned by IPS_GetIcons.

The ID of the Util Control instance can be determined e.g. with IPS_GetInstanceListByModuleID and the module GUID {B69010EA-96D5-46DF-B885-24821B8C8DBD}. If InstanceID does not exist, the function fails with "Instance #... does not exist", if the instance belongs to another module, with "Instance does not implement this function".

Example

// Determine the ID of the Util Control instance
$id = IPS_GetInstanceListByModuleID('{B69010EA-96D5-46DF-B885-24821B8C8DBD}')[0];

print_r(UC_GetIconList($id));

/* e.g. returns:
Array
(
    [0] => Aircraft
    [1] => Alert
    [2] => ArrowRight
    [3] => Backspace
    [4] => Basement
    ...
)
*/
Any questions?