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 TfCollectionHandler

Manipulates collection content objects (TfCollection).

TfContentHandler uses TfContentTypes
Extended by TfCollectionHandler
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 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/TfCollectionHandler.php

Methods summary

public
# __construct( TfValidator $validator, TfDatabase $db, TfCriteriaFactory $criteriaFactory, TfFileHandler $fileHandler, TfTaglinkHandler $taglinkHandler )

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.
$fileHandler
An instance of the Tuskfish file handler class.
$taglinkHandler
An instance of the Tuskfish taglink handler class.

Overrides

TfContentHandler::__construct
public integer
# getCount( TfCriteria $criteria = null )

Count TfCollection objects, optionally matching conditions specified with a TfCriteria\ object.

Count TfCollection objects, optionally matching conditions specified with a TfCriteria\ object.

Parameters

$criteria
Query composer object used to build conditional database query.

Returns

integer
$count Number of collection objects matching the criteria.

Overrides

TfContentHandler::getCount
public array
# getObjects( TfCriteria $criteria = null )

Get TfCollection objects, optionally matching conditions specified with a TfCriteria object.

Get TfCollection objects, optionally matching conditions specified with a TfCriteria object.

Note that the object type is automatically set, so it is unnecessary to set it when calling TfCollectionHandler::getObjects($criteria). However, if you want to use the generic handler TfContentHandler::getObjects($criteria) then you do need to specify the object type, otherwise you will get all types of content returned. It is acceptable to use either handler, although good practice to use the type-specific one when you know you want a specific kind of object.

Parameters

$criteria
Query composer object used to build conditional database query.

Returns

array
$objects TfCollection objects.

Overrides

TfContentHandler::getObjects
public string
# getParentSelectBox( integer $selected = 0 )

Get a select box listing a tree of parent (TfCollection) objects.

Get a select box listing a tree of parent (TfCollection) objects.

Parameters

$selected
Currently selected option.

Returns

string
HTML select box.

Methods inherited from TfContentHandler

convertRowToObject(), delete(), deleteParentalReferences(), getActiveTagList(), getListOfMimetypes(), getListOfTitles(), getObject(), getOnlineSelectBox(), getTagList(), getTags(), getTypeIndex(), getTypeSelectBox(), insert(), isSanctionedType(), makeTagLinks(), streamDownloadToBrowser(), toggleOnlineStatus(), update(), updateCounter()

Methods used from TfContentTypes

getTypes()

Properties summary

Properties inherited from TfContentHandler

$criteriaFactory, $db, $fileHandler, $taglinkHandler, $validator

Tuskfish API V1.1.1 API documentation generated by ApiGen