TagsHelper
class TagsHelper extends CMSHelper
Tags helper class, provides methods to perform various tasks relevant tagging of content.
Properties
string | $typeAlias | Alias for querying mapping and content type table. |
Methods
Method to get an object containing all of the table columns and values.
Method to add tag rows to mapping table.
Function that converts tags paths into paths of names
Create any new tags by looking for #new# in the strings
Create any new tags by looking for #new# in the metadata
Method to delete the tag mappings and #__ucm_content record for for an item
Method to get a list of tags for an item, optionally with the tag data.
Method to get a list of tags for a given item.
Method to get a query to retrieve a detailed list of items for a tag.
Function that converts tag ids to their tag names
Method to get an array of tag ids for the current tag and its children
Method to get the type id for a type alias.
Method to get a list of types with associated data.
Function that handles saving tags used in a table class after a store()
Function that preProcesses data from a table prior to a store() to ensure proper tag handling
Function to search tags
Method to delete all instances of a tag from the mapping table. Generally used when a tag is deleted.
Method to add or update tags associated with an item.
Method to untag an item
Details
stdClass
getDataObject(
TableInterface $table)
Method to get an object containing all of the table columns and values.
boolean
addTagMapping(
integer $ucmId,
TableInterface $table,
array $tags = array())
Method to add tag rows to mapping table.
static
array
convertPathsToNames(
array $tags)
Function that converts tags paths into paths of names
mixed
createTagsFromMetadata(
string $metadata)
Create any new tags by looking for #new# in the metadata
boolean
deleteTagData(
TableInterface $table,
integer|array $contentItemId)
Method to delete the tag mappings and #__ucm_content record for for an item
array
getItemTags(
string $contentType,
integer $id,
boolean $getTagData = true)
Method to get a list of tags for an item, optionally with the tag data.
string
getTagIds(
mixed $ids,
string $prefix)
Method to get a list of tags for a given item.
Normally used for displaying a list of tags within a layout
JDatabaseQuery
getTagItemsQuery(
mixed $tagId,
mixed $typesr = null,
boolean $includeChildren = false,
string $orderByOption = 'c.core_title',
string $orderDir = 'ASC',
boolean $anyOrAll = true,
string $languageFilter = 'all',
string $stateFilter = '0,1')
Method to get a query to retrieve a detailed list of items for a tag.
mixed
getTagTreeArray(
integer $id,
array $tagTreeArray = array())
Method to get an array of tag ids for the current tag and its children
static
array
getTypes(
string $arrayType = 'objectList',
array $selectTypes = null,
boolean $useAlias = true)
Method to get a list of types with associated data.
boolean
postStoreProcess(
TableInterface $table,
array $newTags = array(),
boolean $replace = true)
Function that handles saving tags used in a table class after a store()
null
preStoreProcess(
TableInterface $table,
array $newTags = array())
Function that preProcesses data from a table prior to a store() to ensure proper tag handling
void
tagDeleteInstances(
integer $tag_id)
Method to delete all instances of a tag from the mapping table. Generally used when a tag is deleted.
boolean
tagItem(
integer $ucmId,
TableInterface $table,
array $tags = array(),
boolean $replace = true)
Method to add or update tags associated with an item.
boolean
unTagItem(
integer $contentId,
TableInterface $table,
array $tags = array())
Method to untag an item