Class TfContentHandler
Base content handler class. Manipulates content objects (TfContentObject and subclasses).
Provides base content handler methods that are inherited or overridden by subclass-specific content handlers. You can use it as a generic handler when you want to retrieve mixed content types. If you want to retrieve a specific content type it would be better to use the specific content handler for that type, as it may contain additional functionality for processing or displaying it.
- TfContentHandler uses TfContentTypes
Direct known subclasses
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 TfishContentObject 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.
Var: TfFileHandler $fileHandler Instance of the Tuskfish file handler class.
Var: TfTaglinkHandler $taglinkHandler Instance of the Tuskfish taglink handler class.
Located at trust_path/modules/content/class/TfContentHandler.php
Methods summary
public
|
#
__construct(
Constructor. |
public
object|boolean
|
#
convertRowToObject( array $row )
Convert a database content row to a corresponding content object. |
public
boolean
|
|
public
boolean
|
#
deleteParentalReferences( integer $id )
Removes references to a collection when it is deleted or changed to another type. |
public
boolean
|
|
public
boolean
|
#
isSanctionedType( string $type )
Checks if a class name is a sanctioned subclass of TfContentObject. |
public
array|boolean
|
#
getActiveTagList( string $type = null, boolean $onlineOnly = true )
Get a list of tags actually in use by other content objects, optionally filtered by type. |
public
integer
|
#
getCount(
Count content objects optionally matching conditions specified with a TfCriteria object. |
public
array
|
|
public
array
|
#
getListOfTitles(
Returns a list of content object titles with ID as key. |
public
|
|
public
array
|
#
getObjects(
Get content objects, optionally matching conditions specified with a TfCriteria object. |
public
string
|
#
getOnlineSelectBox( integer $selected = null, string $zeroOption = TFISH_ONLINE_STATUS )
Generates an online/offline select box. |
public
array
|
|
public
array
|
|
protected
integer|null
|
#
getTypeIndex( array $criteriaItems )
Search the filtering criteria ($criteria->items) to see if object type has been set and return the key. |
public
string
|
#
getTypeSelectBox( string $selected = '', string $zeroOption = null )
Get a content type select box. |
public
array
|
#
makeTagLinks( array $tags, string $targetFilename = '' )
Converts an array of tagIds into an array of tag links with an arbitrary local target file. |
public
boolean
|
#
streamDownloadToBrowser( integer $id, string $filename = '' )
Initiate streaming of a downloadable media file associated with a content object. |
public
boolean
|
|
public
boolean
|
|
public
|
Methods used from TfContentTypes
Properties summary
protected
|
$validator
|
|
protected
|
$db
|
|
protected
|
$criteriaFactory
|
|
protected
|
$fileHandler
|
|
protected
|
$taglinkHandler
|