CSTags
in package
Tag api class
Tags
Table of Contents
- filterObjectIdsByTagIds() : array<string|int, mixed>
- Filters all ids not matching the given tag ids
- getAllTagIds() : array<string|int, mixed>
- Returns all tag ids recursively for the provided root ids.
- getInformationForTagIds() : array<string|int, mixed>
- Returns tag information for tags with the specified ids, as data arrays with the following properties: - TagID - Name - Label - Description - Icon - ExternalKey - Inheritable
- getLabelsForTagIds() : array<string|int, mixed>
- Returns tag labels for tags with the specified ids.
- getObjectIdsForTagIds() : array<string|int, mixed>
- Returns all ids matching the given tag ids
- getTagChangesForTimeInterval() : array<string|int, mixed>
- Returns tag changes that happened in the provided time frame
- getTagIdsByNames() : array<string|int, mixed>
- Searches for tags matching the names inside the provided list. Following columns are searched: Label, Name, ExternalKey, TagID
- getTagIdsForObjectIds() : array<string|int, mixed>
- Returns all assigned tag ids for objects with provided ids in the form array ( {OBJECT_ID} => array( {TAGID_1}, {TAGID_2}, {TAGID_3}, ... )
- removeFolderIdsFromTagIdList() : array<string|int, mixed>
- Returns ids of leaf nodes from given Tag ids.
Methods
filterObjectIdsByTagIds()
Filters all ids not matching the given tag ids
public
static filterObjectIdsByTagIds(Record $oRecord, array<string|int, mixed> $aIds, array<string|int, mixed> $aTagIds) : array<string|int, mixed>
Parameters
- $oRecord : Record
-
The record class to be filtered for
- $aIds : array<string|int, mixed>
-
The ids to be filtered
- $aTagIds : array<string|int, mixed>
-
The tag ids to filter for
Tags
Return values
array<string|int, mixed> —The ids matching the tag ids
getAllTagIds()
Returns all tag ids recursively for the provided root ids.
public
static getAllTagIds(array<string|int, mixed> $aTagIds) : array<string|int, mixed>
Parameters
- $aTagIds : array<string|int, mixed>
-
The tag root ids for which the recursive search should be executed
Tags
Return values
array<string|int, mixed> —All tag ids contained by the provided root ids
getInformationForTagIds()
Returns tag information for tags with the specified ids, as data arrays with the following properties: - TagID - Name - Label - Description - Icon - ExternalKey - Inheritable
public
static getInformationForTagIds(array<string|int, mixed> $aTagIds[, int|null $iLanguageId = null ]) : array<string|int, mixed>
Parameters
- $aTagIds : array<string|int, mixed>
-
The tag ids for which the information should be returned.
- $iLanguageId : int|null = null
-
The language id to get the translated tag label
Tags
Return values
array<string|int, mixed> —List with tags, each being an array with the information
getLabelsForTagIds()
Returns tag labels for tags with the specified ids.
public
static getLabelsForTagIds(array<string|int, mixed> $aTagIds) : array<string|int, mixed>
Parameters
- $aTagIds : array<string|int, mixed>
-
The tag ids for which the labels should be returned.
Tags
Return values
array<string|int, mixed> —List with tag id to label mapping
getObjectIdsForTagIds()
Returns all ids matching the given tag ids
public
static getObjectIdsForTagIds(Record $oRecord, array<string|int, mixed> $aTagIds) : array<string|int, mixed>
Parameters
- $oRecord : Record
-
The record class to be filtered for
- $aTagIds : array<string|int, mixed>
-
The tag ids to filter for
Tags
Return values
array<string|int, mixed> —The ids matching the tag ids
getTagChangesForTimeInterval()
Returns tag changes that happened in the provided time frame
public
static getTagChangesForTimeInterval(Record $oRecord, string $sFrom, string $sTo) : array<string|int, mixed>
Parameters
- $oRecord : Record
-
The record type for which to retrieve the changes
- $sFrom : string
-
The "from" date in the format "YYYY-MM-DD HH:II:SS"
- $sTo : string
-
The "to" date in the format "YYYY-MM-DD HH:II:SS"
Tags
Return values
array<string|int, mixed> —The list of changes in the format array( RECORDID => array( TAGID => array( 'ChangeType' => CHANGETYPE 'ChangeDate' => 'YYYY-MM-DD HH:II:SS' ), TAGID => array( 'ChangeType' => CHANGETYPE 'ChangeDate' => 'YYYY-MM-DD HH:II:SS' ) ) ) Where CHANGETYPE if one of: -1 => tag got deleted 1 => tag got added
getTagIdsByNames()
Searches for tags matching the names inside the provided list. Following columns are searched: Label, Name, ExternalKey, TagID
public
static getTagIdsByNames(array<string|int, mixed> $aNames) : array<string|int, mixed>
Parameters
- $aNames : array<string|int, mixed>
-
List of names to be searched
Tags
Return values
array<string|int, mixed> —List of matching tag ids
getTagIdsForObjectIds()
Returns all assigned tag ids for objects with provided ids in the form array ( {OBJECT_ID} => array( {TAGID_1}, {TAGID_2}, {TAGID_3}, ... )
public
static getTagIdsForObjectIds(Record $oRecord, array<string|int, mixed> $aObjectIds) : array<string|int, mixed>
Parameters
- $oRecord : Record
-
The record object for which the tag ids should be returned.
- $aObjectIds : array<string|int, mixed>
-
The object ids for which the tag ids should be returned.
Tags
Return values
array<string|int, mixed> —Mapping array with object ids and corresponding tag ids.
removeFolderIdsFromTagIdList()
Returns ids of leaf nodes from given Tag ids.
public
static removeFolderIdsFromTagIdList(array<string|int, mixed> $aIds) : array<string|int, mixed>
Parameters
- $aIds : array<string|int, mixed>
-
Contains ids of tags including folder and non-folder.
Tags
Return values
array<string|int, mixed> —Returns ids of leaf nodes or non-folder nodes from given set of Tag ids.
