« Back to Product

Documentation

IPS_GetMediaListByType

 array IPS_GetMediaListByType (int $MediaType) 

Parameters

MediaType
Value Constant Description
0 MEDIATYPE_IPSVIEW IPSView Form
1 MEDIATYPE_IMAGE Image object
2 MEDIATYPE_SOUND Sound object
3 MEDIATYPE_STREAM Stream object
4 MEDIATYPE_CHART Chart object
5 MEDIATYPE_DOCUMENT Document object

Returns

An array of integer values of all IDs of the media objects with the type MediaType in IP Symcon. The order of the entries is not guaranteed.

Description

The function determines the IDs of all registered media objects in the media pool of the type MediaType. The IDs are listed in an array. If no corresponding media object exists, the array is empty.

The array only contains objects of the media type MediaType. To list all media objects, the function IPS_GetMediaList can be used.

Example

$allImageObjects = IPS_GetMediaListByType(MEDIATYPE_IMAGE); // list only Image objects
print_r($allImageObjects);         

/* returns e.g.:
Array
(
    [0] => 37659
    [1] => 18326
    etc. ...
)        
*/
Any questions?