Tuskfish API V1.1.2
  • Package
  • Class

Packages

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

Classes

  • TfArticle
  • TfAudio
  • TfBlock
  • TfBlockHandler
  • TfCollection
  • TfCollectionHandler
  • TfContentControllerFactory
  • TfContentHandler
  • TfContentHandlerFactory
  • TfContentObject
  • TfContentObjectController
  • TfDownload
  • TfImage
  • TfRss
  • TfSearchContent
  • TfStatic
  • TfTag
  • TfTagHandler
  • TfTaglinkHandler
  • TfVideo

Traits

  • TfContentTypes

Class TfBlockHandler

Manipulates block content objects (TfBlock).

TfContentHandler uses TfContentTypes
Extended by TfBlockHandler
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/TfBlockHandler.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 TfBlock objects, optionally matching conditions specified in a TfCriteria object.

Count TfBlock objects, optionally matching conditions specified in a TfCriteria object.

Parameters

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

Returns

integer
$count Count of TfBlock objects matching conditions.

Overrides

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

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

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

Note that the article type is automatically set, so when calling TfBlockHandler::getObjects($criteria) it is unnecessary to set the object type. However, if you want to use 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 probably good practice to use the object- 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 content objects.

Overrides

TfContentHandler::getObjects

Methods inherited from TfContentHandler

convertRowToObject(), delete(), deleteParentalReferences(), getActiveTagList(), getListOfMimetypes(), getListOfTitles(), getObject(), getOnlineSelectBox(), getTagList(), getTags(), getTypeIndex(), getTypeSelectBox(), insert(), isSanctionedType(), loadTagsForObject(), 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.2 API documentation generated by ApiGen