UNB Components Code Reference

UnbTag class

The tag class represents a single tag in the UNB system and provides methods to find and manipulate tag instances.

It depends on the UnbDatabase class for a database connection.

Extends class

UnbEntity

Public methods

   AddReadAccessKey Adds a key to this tag that allows reading it.
   AddUseAccessKey Adds a key to this tag that allows using it.
S Create Creates a new tag instance.
   Delete Deletes this instance of the tag with all its references.
S Find Finds all tags and returns them in their hierarchical order.
S FindByMeaning Finds tag instances by their tag meaning value.
S FindByTagId Finds a tag instance or an array of tag instances by its/their tag ID.
S FindByTagName Finds one or more tag instances by their tag name.
   GetDescription Gets the tag's description.
   GetFlags Gets the tag's flags.
S GetHierarchicalOrder Gets the cached correct hierarchical order of all tags.
   GetMeaning Gets the tag's meaning value.
   GetParentTag Gets the tag's assigned parent tag.
   GetParentTagId Gets the ID of the tag's assigned parent tag.
   GetReadAccessKeys Gets a list of all keys that allow reading messages with this tag set.
   GetTagData Gets the tag data that is assigned to a message.
   GetTagId Gets the tag ID.
   GetTagName Gets the tag's displayed name.
   GetUseAccessKeys Gets a list of all keys that allow using this tag.
   IsUseAllowed Gets a value indicating whether using this tag is allowed to the current session user.
S IsUseAllowedById Gets a value indicating whether using a tag specified by its tag ID is allowed to the current session user.
   RemoveReadAccessKey Removes a key from this tag that allows reading it.
   RemoveUseAccessKey Removes a key from this tag that allows using it.
   SetDescription Sets the tag's description.
   SetFlags Sets the tag's flags.
   SetMeaning Sets the tag's meaning value.
   SetParentTag Sets the tag's parent tag ID.
   SetReadAccessKeys Sets all keys for this tag that allow reading it. This removes any keys set before.
   SetTagName Sets the tag's displayed name.
   SetUseAccessKeys Sets all keys for this tag that allow using it. This removes any keys set before.

Protected methods

S FromRecord Creates a UnbTag object from a database record array.

Private methods

   Class constructor No description available.
S UpdateHierarchicalOrder Updates the cached correct hierarchical order of all tags.
S UpdateHierarchicalOrder_Rec Recursion function for UpdateHierarchicalOrder().

Private fields

db
Cached UnbDatabase instance
description  –  default: ''
Description of this tag that explains the user when and why this tag should be used
flags  –  default: 0
Flags for special tag behaviour (see UnbTagFlag constants)
meaning  –  default: 0
Special meaning of this tag
parentTag  –  default: 0
ID of the parent tag for this tag, used to organise tags in a tree hierarchy
tagData  –  default: null
For use with a tag instance assigned to a message
tagHierarchicalOrder  –  default: null
Caches the correct hierarchical order of all tags
tagId  –  default: 0
Tag ID
tagName  –  default: ''
Displayed name of the tag

Implementation file: tag.class.php, line 33

© 2010 Yves Goergen. UNB Components Homepage. Reference generated on 2010-03-07.