« Back to Product

Documentation

IPS_GetLink

Require: Symcon >= 2.1

 array IPS_GetLink (int $LinkID) 

Parameters

LinkID

ID of the link

Returns

The following information is available as key => value pairs:

Index  Type Description
LinkID integer ObjectID
LinkChildID(until 3.4) integer ID of the object with which this link is connected. See: IPS_SetLinkTargetID (since 4.0 permanently replaced by TargetID)
TargetID(since 2.6) integer ID of the object with which this link is connected. See: IPS_SetLinkTargetID

Description

The function returns an array containing information about the link with the ID LinkID. If the link does not exist, a warning is generated.

Example

//Since Version 4.0
print_r(IPS_GetLink(19668));

/* returns e.g.:
Array
(
    [LinkID] => 19668
    [TargetID] => 14444
)
*/

//Up to Version 3.4
print_r(IPS_GetLink(19668));

/* returns e.g.:
Array
(
    [LinkID] => 19668
    [LinkChildID] => 14444
    [TargetID] => 14444
)
*/

//Up to Version 2.5
print_r(IPS_GetLink(19668));

/* returns e.g.:
Array
(
    [LinkID] => 19668
    [LinkChildID] => 14444
)
*/
Any questions?