class File (View source)

When activating a theme, any file within the theme is loaded into the system as a Page Theme File. At that point the file can then be used to create a new page type.

\@package Pages

Constants

TFTYPE_VIEW

Type of page corresponding to the view template (used by single pages in this theme). Typically that means this template file is "view.php".

TFTYPE_DEFAULT

Type of page corresponding to the default page type. If a page type doesn't have a template in a particular theme, default is used.

TFTYPE_SINGLE_PAGE

If this is used to designate what type of template this is, this means it corresponds to a single page like "login.php".

TFTYPE_PAGE_TEMPLATE_NEW

This is a template for a page - one that hasn't been previously created in the system.

TFTYPE_PAGE_TEMPLATE_EXISTING

This is a template for a page that already exists in the system.

TFTYPE_PAGE_CLASS

A custom class for a page theme.

Properties

protected $filename
protected $type

Methods

setFilename($filename)

Sets the filename of this object to the passed parameter.

setType($type)

Sets the type of file for this object to one of the constants.

string
getFilename()

Gets the filename for this theme file object.

string
getType()

Gets the type of file for this object.

string
getHandle()

Returns just the part of the filename prior to the extension.

Details

setFilename($filename)

Sets the filename of this object to the passed parameter.

Parameters

$filename

setType($type)

Sets the type of file for this object to one of the constants.

Parameters

$type

string getFilename()

Gets the filename for this theme file object.

Return Value

string

$filename

string getType()

Gets the type of file for this object.

Return Value

string

$type

string getHandle()

Returns just the part of the filename prior to the extension.

Return Value

string

$handle