Constructor
object
Tag
(string $value)
Answer true if the current user can remove a tag from an item
boolean
canRemoveFromItem
(object $item)
Answer the current user id
string
getCurrentUserId
()
Answer the current user id
string
getCurrentUserIdString
()
Answer the database index
integer
getDatabaseIndex
()
Answer all items with this tag
Answer all items with this tag where the tag was added by the given agent
Answer all items with this tag in a particular system
object ItemsIterator
getItemsForAgentInSystem
(mixed $agentId, mixed $system)
Answer all items with this tag
Answer all items with this tag in a particular system
object ItemsIterator
getItemsForCurrentUserInSystem
(mixed $system, integer $max)
-
integer
$max: The maximum number of tags to return. The least frequently used tags will be dropped first. If $max is 0, all tags will be returned.
Answer all items with this tag in a particular system
object ItemsIterator
getItemsInSystem
(mixed $system)
Answer all items with this tag that match a particular list
object ItemsIterator
getItemsWithIdsInSystem
(object IdIterator $ids, mixed $system)
Answer the number of occurances of this tag across all users
integer
getOccurances
()
Answer the number of occurances of this tag across all users
integer
getOccurancesForAgent
(object Id $agentId)
Answer the Tags related to this one. Relation is defined as being attached to the same items as this tag.
object TagIterator
getRelatedTags
([string $sortBy = TAG_SORT_ALFA], integer $max)
-
string
$sortBy: Return tags in alphanumeric order or by frequency of usage.
-
integer
$max: The maximum number of tags to return. The least frequently used tags will be dropped first. If $max is 0, all tags will be returned.
Answer the value
string
getValue
()
Answer true if the current agent has tagged the item
Remove the tag everywhere where the current user has added it.
void
removeAllMine
()
Remove the tag from one or more items, skipping those where authorization is lacking.
void
removeFromItems
(mixed $items)
-
mixed
$items: This can be a single Item object, an TaggedItemIterator, or an array of Item objects.
Remove the tag from one or more items, skipping those where authorization is lacking.
void
removeFromItemsForAgent
(mixed $items, object Id $agentId)
-
mixed
$items: This can be a single Item object, an TaggedItemIterator, or an array of Item objects.
-
object Id
$agentId
Rename the tag for the given agent
void
renameForAgent
(object Id $agentId, string $newValue)
-
object Id
$agentId
-
string
$newValue
Rename the tag for the current user
void
renameForCurrentUser
(string $newValue)
Set the number of occurances
void
setOccurances
(integer $num)
Set the number of occurances
void
setOccurancesForAgent
(object Id $agentId, integer $num)
-
object Id
$agentId
-
integer
$num
Add this tag to an Item for a particular agent