Traits

Class TfContentHandler

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.

Only use this function to convert single objects, as it does a separate query to look up
the associated taglinks. Running it through a loop will therefore consume a lot of resources.
To convert multiple objects, load them directly into the relevant class files, prepare a
buffer of tags using getTags() and loop through the objects referring to the buffer rather
than hitting the database every time.

Returns

Note that content child content classes that have unset unused properties from the parent
should reset them to null before insertion or update. This is to guard against the case
where the admin reassigns the type of a content object - it makes sure that unused properties
are zeroed in the database.

Returns

This list is not exhaustive, but it does cover most things that a sane person would want.
Feel free to add more if you wish, but do NOT use this as a whitelist of permitted mimetypes,
it is just a reference.

Parameters

Returns

Converts an array of tagIds into an array of tag links with an arbitrary local target file.

Converts an array of tagIds into an array of tag links with an arbitrary local target file.

Note that the filename may only consist of alphanumeric characters and underscores. Do not
include the file extension (eg. use 'article' instead of 'article.php'. The base URL of the
site will be prepended and .php plus the tagId will be appended.

Parameters

Returns

Initiate streaming of a downloadable media file associated with a content object.

Initiate streaming of a downloadable media file associated with a content object.

DOES NOT WORK WITH COMPRESSION ENABLED IN OUTPUT BUFFER. This method acts as an intermediary
to provide access to uploaded file resources that reside outside of the web root, while
concealing the real file path and name. Use this method to provide safe user access to
uploaded files. If anything nasty gets uploaded nobody will be able to execute it directly
through the browser.

Parameters

$id

ID of the associated content object.

$filename

An alternative name (rename) for the file you wish to transfer,
excluding extension.