public
boolean
|
#
addTagMapping( integer $ucmId, JTableInterface $table, array $tags = array() )
Method to add tag rows to mapping table.
Method to add tag rows to mapping table.
Parameters
- $ucmId
integer - $ucmId ID of the #__ucm_content item being tagged
- $table
JTableInterface - $table JTable object being tagged
- $tags
array - $tags Array of tags to be applied.
Returns
boolean - true on success, otherwise false.
Since
3.1
|
public static
array
|
#
convertPathsToNames( array $tags )
Function that converts tags paths into paths of names
Function that converts tags paths into paths of names
Parameters
- $tags
array - $tags Array of tags
Returns
array
Since
3.1
|
public
mixed
|
#
createTagsFromField( array $tags )
Create any new tags by looking for #new# in the strings
Create any new tags by looking for #new# in the strings
Parameters
- $tags
array - $tags Tags text array from the field
Returns
mixed - If successful, metadata with new tag titles replaced by tag ids. Otherwise
false.
Since
3.1
|
public
mixed
|
#
createTagsFromMetadata( string $metadata )
Create any new tags by looking for #new# in the metadata
Create any new tags by looking for #new# in the metadata
Deprecated
4.0 This method is no longer used in the CMS and will not be replaced.
Parameters
- $metadata
string - $metadata Metadata JSON string
Returns
mixed - If successful, metadata with new tag titles replaced by tag ids. Otherwise
false.
Since
3.1
|
public
boolean
|
#
deleteTagData( JTableInterface $table, integer|array $contentItemId )
Method to delete the tag mappings and #__ucm_content record for for an
item
Method to delete the tag mappings and #__ucm_content record for for an
item
Parameters
- $table
JTableInterface - $table JTable object of content table where delete occurred
- $contentItemId
integer|array - $contentItemId ID of the content item. Or an array of key/value pairs with array
key being a primary key name and value being the content item ID. Note multiple
primary keys are not supported
Returns
boolean - true on success, false on failure
Throws
Since
3.1
|
public
array
|
#
getItemTags( string $contentType, integer $id, boolean $getTagData = true )
Method to get a list of tags for an item, optionally with the tag data.
Method to get a list of tags for an item, optionally with the tag data.
Parameters
- $contentType
string - $contentType Content type alias. Dot separated.
- $id
integer - $id Id of the item to retrieve tags for.
- $getTagData
boolean - $getTagData If true, data from the tags table will be included, defaults to
true.
Returns
array - Array of of tag objects
Since
3.1
|
public
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
Method to get a list of tags for a given item. Normally used for displaying a
list of tags within a layout
Parameters
- $ids
mixed - $ids The id or array of ids (primary key) of the item to be tagged.
- $prefix
string - $prefix Dot separated string with the option and view to be used for a url.
Returns
string - Comma separated list of tag Ids.
Since
3.1
|
public
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.
Method to get a query to retrieve a detailed list of items for a tag.
Parameters
- $tagId
mixed - $tagId Tag or array of tags to be matched
- $typesr
mixed - $typesr Null, type or array of type aliases for content types to be included in
the results
- $includeChildren
boolean - $includeChildren True to include the results from child tags
- $orderByOption
string - $orderByOption Column to order the results by
- $orderDir
string - $orderDir Direction to sort the results in
- $anyOrAll
boolean - $anyOrAll True to include items matching at least one tag, false to include
items all tags in the array.
- $languageFilter
string - $languageFilter Optional filter on language. Options are 'all', 'current' or any
string.
- $stateFilter
string - $stateFilter Optional filtering on publication state, defaults to published or
unpublished.
Returns
Since
3.1
|
public
array
|
#
getTagNames( array $tagIds )
Function that converts tag ids to their tag names
Function that converts tag ids to their tag names
Parameters
- $tagIds
array - $tagIds Array of integer tag ids.
Returns
array - An array of tag names.
Since
3.1
|
public
mixed
|
#
getTagTreeArray( integer $id, array & $tagTreeArray = array() )
Method to get an array of tag ids for the current tag and its children
Method to get an array of tag ids for the current tag and its children
Parameters
- $id
integer - $id An optional ID
- $tagTreeArray
array - &$tagTreeArray Array containing the tag tree
Returns
mixed
Since
3.1
|
public
string
|
#
getTypeId( string $typeAlias )
Method to get the type id for a type alias.
Method to get the type id for a type alias.
Deprecated
4.0 Use JUcmType::getTypeId() instead
Parameters
- $typeAlias
string - $typeAlias A type alias.
Returns
string - Name of the table for a type
Since
3.1
|
public static
array
|
#
getTypes( string $arrayType = 'objectList', array $selectTypes = null, boolean $useAlias = true )
Method to get a list of types with associated data.
Method to get a list of types with associated data.
Parameters
- $arrayType
string - $arrayType Optionally specify that the returned list consist of objects,
associative arrays, or arrays. Options are: rowList, assocList, and objectList
- $selectTypes
array - $selectTypes Optional array of type ids to limit the results to. Often from a
request.
- $useAlias
boolean - $useAlias If true, the alias is used to match, if false the type_id is used.
Returns
array - Array of of types
Since
3.1
|
public
boolean
|
#
postStoreProcess( JTableInterface $table, array $newTags = array(), boolean $replace = true )
Function that handles saving tags used in a table class after a store()
Function that handles saving tags used in a table class after a store()
Parameters
- $table
JTableInterface - $table JTable being processed
- $newTags
array - $newTags Array of new tags
- $replace
boolean - $replace Flag indicating if all exising tags should be replaced
Returns
boolean
Since
3.1
|
public
null
|
#
preStoreProcess( JTableInterface $table, array $newTags = array() )
Function that preProcesses data from a table prior to a store() to ensure
proper tag handling
Function that preProcesses data from a table prior to a store() to ensure
proper tag handling
Parameters
- $table
JTableInterface - $table JTable being processed
- $newTags
array - $newTags Array of new tags
Returns
null
Since
3.1
|
public static
array
|
#
searchTags( array $filters = array() )
Function to search tags
Parameters
- $filters
array - $filters Filter to apply to the search
Returns
array
Since
3.1
|
public
|
#
tagDeleteInstances( integer $tag_id )
Method to delete all instances of a tag from the mapping table. Generally
used when a tag is deleted.
Method to delete all instances of a tag from the mapping table. Generally
used when a tag is deleted.
Parameters
- $tag_id
integer - $tag_id The tag_id (primary key) for the deleted tag.
Since
3.1
|
public
boolean
|
#
tagItem( integer $ucmId, JTableInterface $table, array $tags = array(), boolean $replace = true )
Method to add or update tags associated with an item.
Method to add or update tags associated with an item.
Parameters
- $ucmId
integer - $ucmId Id of the #__ucm_content item being tagged
- $table
JTableInterface - $table JTable object being tagged
- $tags
array - $tags Array of tags to be applied.
- $replace
boolean - $replace Flag indicating if all exising tags should be replaced
Returns
boolean - true on success, otherwise false.
Since
3.1
|
public
boolean
|
#
unTagItem( integer $contentId, JTableInterface $table, array $tags = array() )
Method to untag an item
Parameters
- $contentId
integer - $contentId ID of the content item being untagged
- $table
JTableInterface - $table JTable object being untagged
- $tags
array - $tags Array of tags to be untagged. Use an empty array to untag all existing
tags.
Returns
boolean - true on success, otherwise false.
Since
3.1
|