Tuskfish API V1.1.1
  • Package
  • Class

Packages

  • content
  • core
  • database
  • installation
  • security
  • user
  • utilities

Classes

  • TfArticle
  • TfAudio
  • TfBlock
  • TfBlockHandler
  • TfCollection
  • TfCollectionHandler
  • TfContentHandler
  • TfContentHandlerFactory
  • TfContentObject
  • TfDownload
  • TfImage
  • TfMetadata
  • TfPaginationControl
  • TfRss
  • TfSearchContent
  • TfStatic
  • TfTag
  • TfTagHandler
  • TfTaglinkHandler
  • TfTemplate
  • TfVideo

Traits

  • TfContentTypes

Class TfTaglinkHandler

Manipulates taglink objects (TfTaglink).

TfTaglinkHandler uses TfContentTypes
Package: content
Copyright: Simon Wilkinson 2013+ (https://tuskfish.biz)
License: GNU General Public License (GPL) V2
Author: Simon Wilkinson simon@isengard.biz
Version: Release: 1.0
Since: 1.0
Uses: TfContentTypes Whitelist of sanctioned content subclasses.
Var: TfValidator $validator Instance of the Tuskfish data validator class.
Var: TfDatabase $db Instance of the Tuskfish database class.
Var:

TfCriteriaFactory $criteriaFactory Instance of the Tuskfish criteria factory class. factory class.


Located at trust_path/modules/content/class/TfTaglinkHandler.php

Methods summary

public
# __construct( TfValidator $validator, TfDatabase $db, TfCriteriaFactory $criteriaFactory )

Constructor.

Constructor.

Parameters

$validator
An instance of the Tuskfish data validator class.
$db
An instance of the database class.
$criteriaFactory
an instance of the Tuskfish criteria factory class.
public boolean
# deleteTaglinks( object $obj )

Delete taglinks associated with a particular content object.

Delete taglinks associated with a particular content object.

Parameters

$obj
A content object that makes use of the taglinks table.

Returns

boolean
True for success, false on failure.
public boolean
# insertTaglinks( integer $contentId, string $type, string $module, array $tags )

Insert taglinks to the taglink table.

Insert taglinks to the taglink table.

Taglinks represent relationships between tags and content objects.

Parameters

$contentId
ID of content object.
$type
Type of content object as whitelisted in TfTaglinkHandler::getType().
$module
Name of the module the content object is associated with.
$tags
IDs of tags as integers.

Returns

boolean
True on success false on failure.
public boolean
# updateTaglinks( integer $id, string $type, string $module, array $tags = null )

Updates taglinks for a particular content object.

Updates taglinks for a particular content object.

Old taglinks are deleted, newly designated set of taglinks are inserted. Objects that have had their type converted to TfTag lose all taglinks (tags are not allowed to reference tags).

Parameters

$id
ID of target content object.
$type
Type of content object as whitelisted in TfTaglinkHandler::getType().
$module
Name of the module the content object is associated with.
$tags
IDs of tags as integers.

Returns

boolean
True on success false on failure.

Methods used from TfContentTypes

getTypes()

Properties summary

protected $validator
#
protected $db
#
protected $criteriaFactory
#
Tuskfish API V1.1.1 API documentation generated by ApiGen