Tuskfish API
  • Package
  • Class

Packages

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

Classes

  • TfishArticle
  • TfishArticleHandler
  • TfishAudio
  • TfishAudioHandler
  • TfishBlock
  • TfishBlockHandler
  • TfishCollection
  • TfishCollectionHandler
  • TfishContentHandler
  • TfishContentObject
  • TfishDownload
  • TfishDownloadHandler
  • TfishImage
  • TfishImageHandler
  • TfishMetadata
  • TfishRss
  • TfishStatic
  • TfishStaticHandler
  • TfishTag
  • TfishTagHandler
  • TfishTaglink
  • TfishTaglinkHandler
  • TfishTemplate
  • TfishVideo
  • TfishVideoHandler

Class TfishBlock

Static block object class.

Represents a block of content, use it to create HTML blocks to insert into your site layout.

TfishAncestralObject
Extended by TfishContentObject
Extended by TfishBlock
Package: content
Copyright: Simon Wilkinson 2013-2017 (https://tuskfish.biz)
License: GNU General Public License (GPL) V2
Author: Simon Wilkinson simon@isengard.biz
Version: Release: 1.0
Since: 1.0
Properties: int $id Auto-increment, set by database.
Properties: string $type Content object type eg. TfishArticle etc. [ALPHA]
Properties: string $title The name of this content.
Properties: string $description The full article or description of the content. [HTML]
Properties: array $tags Tag IDs associated with this object; not persistent (stored as taglinks in taglinks table).
Properties: int $online Toggle object on or offline.
Properties: int $submission_time Timestamp representing submission time.
Properties: string $handler Handler for this object (not persistent).
Properties: string $template The template that should be used to display this object (not persistent).
Properties: string $module The module that handles this content type (not persistent).
Properties: string $icon The Font Awesome icon representing this content type (not persistent).
Located at trust_path/libraries/tuskfish/class/TfishBlock.php

Methods summary

public
# __construct( )

Initialise default properties and values.

Initialise default properties and values.

Overrides

TfishContentObject::__construct
public
# __set( string $property, mixed $value )

Set the value of a whitelisted property.

Set the value of a whitelisted property.

Intercepts direct calls to set the value of an object property. This method is overridden by child classes to impose data type restrictions and range checks on custom subclass properties.

If you have added some custom properties to this content subclass that need to be type and/or range checked before permitting assignment, add a switch above the call to the parent method. Structure it so that any case not explicitly handled will fall through to the parent method, while explicit cases will be handled here.

Parameters

$property
Name of property.
$value
Value of property.

Overrides

TfishContentObject::__set
protected string
# makeHumanReadable( string $clean_property )

Converts properties to human readable form in preparation for output.

Converts properties to human readable form in preparation for output.

If you have added some custom properties to this content subclass that need to be formatted for output, add a switch above the call to the parent method. Structure it so that any case not explicitly handled will fall through to the parent method, while explicit cases will return a formatted value.

Parameters

$clean_property
Name of content object property to be formatted.

Returns

string
Property formatted to human readable form for output.

Overrides

TfishContentObject::makeHumanReadable
public array
# zeroedProperties( )

Returns an array of base object properties that are not used by this subclass.

Returns an array of base object properties that are not used by this subclass.

This list is also used in update calls to the database to ensure that unused columns are cleared and reset with default values.

Returns

array
Array of properties that should be zeroed (unset).

Overrides

TfishContentObject::zeroedProperties

Methods inherited from TfishContentObject

escape(), getCachedImage(), getURL(), loadProperties(), validMedia()

Methods inherited from TfishAncestralObject

__get(), __isset(), __unset(), getPropertyWhitelist(), toArray()

Properties summary

Properties inherited from TfishAncestralObject

$__data, $__properties

Tuskfish API API documentation generated by ApiGen