frontend_theme_placeholder View code

A class that acts as a placeholder for a frontend theme.

the frontend theme is used by the cms_theme resource to display content

since 2.3
package

CMS

license

GPL

property-read

The name for this theme. Must be unique for the instalation.

property-read

Optional name of a theme that this theme extends.

author

Robert Campbell (calguy1000@cmsmadesimple.org)

Methods

__construct(string $name, array $options) 

Constructor

Valid options include: location: (string) The file system path (or uri) where the theme files can be found. urlbase: (string) the complete URL to the directory where this theme exists. Used for creating font, js, and image URL's. 'extends_theme': (string, optional) - The name of the theme that this theme extends 'page_templates': array - An array of records containing information about page templates exported by this theme. Each page templates element contains a 'label', and 'template' key defining the page templates to allow use in the content manager. i.e: page_templates = [ [ 'label'=>'Home Page', 'template'=>'HomePage.tpl' ], [ 'label'=>'Internal Page', 'template'=>'InternalPage.tpl' ], ];

Arguments

string $name

The theme name

array $options

An associative array of options.

get_exported_page_templates() : array|null

Get the list of page templates exported by this module.

Response

array|null

An array of page template definitions. Each element of the array is an associative array with label and template keys.

get_location() : string

Get the location where theme files can be located.

Response

string

get_urlbase() : string

Get the URL where theme files can be located.

Response

string

has_template(string $template_name) : boolean

Test whether this theme has the named template.

Arguments

string $template_name

Response

boolean

get_template_file(string $template_name) : string

Get the filesystem path (or URI) to the named template.

Arguments

string $template_name

Response

string

Properties

name

name : string

The name for this theme. Must be unique for the instalation.

Type(s)

string

extends_theme

extends_theme : string

Optional name of a theme that this theme extends.

Type(s)

string