This is the API documentation for concrete5 version 5.6 and earlier. View Current API Documentation

Class Concrete5_Model_PageTheme

A page's theme is a pointer to a directory containing templates, CSS files and optionally PHP includes, images and JavaScript files. Themes inherit down the tree when a page is added, but can also be set at the site-wide level (thereby overriding any previous choices.)

Concrete5_Library_Object
Extended by Object
Extended by Concrete5_Model_PageTheme

Direct known subclasses

PageTheme

Package: Pages
Subpackages: Themes
Located at core/models/page_theme.php

Methods summary

public static
public static
public static
public static
# getList( $where = null )
public static
public static
# getAvailableThemes( $filterInstalled = true )
public static
# getByFileHandle( $handle, $dir = DIR_FILES_THEMES )
public
# outputStyleSheet( string $file, $styles = false )

Looks into the current theme and outputs the contents of the stylesheet. This function will eventually check to see if a cached version is available, as well as tie the dynamic areas of the stylesheet to whatever they have been saved.

public
# parseStyleSheet( $file, $styles = false )
public
public
# reset( )

Removes any custom styles by clearing them out of the database

public
# saveEditableStyles( array $styles )

Takes an associative array of pagethemeeditablestyle objects and saves it to the PageThemeStyles table

public array
# getEditableStylesList( string $file,… )

Retrieves an array of editable style objects from the current them. This is accomplished by locating all style sheets in the root of the theme, parsing all their contents

public PageTheme
# getByHandle( string $ptHandle )
public PageTheme
# getByID( integer $ptID )
protected
# populateThemeQuery( $where, $args )
public
# add( $ptHandle, $pkg = null )
public
public static
# exportList( $xml )
protected
# install( $dir, $ptHandle, $pkgID )
public
public
public string
# getThemeDisplayName( string $format = 'html' )

Returns the display name for this theme (localized and escaped accordingly to $format)

public
public
public
public
public string
# getThemeDisplayDescription( string $format = 'html' )

Returns the display description for this theme (localized and escaped accordingly to $format)

public
public
public
public
public
public
public
public

Constants summary

integer E_THEME_INSTALLED
# 1
string THEME_EXTENSION
# ".php"
string FILENAME_TYPOGRAPHY_CSS
# "typography.css"
string FILENAME_EXTENSION_CSS
# "css"

Properties summary

protected $ptName
#
protected $ptID
#
protected $ptDescription
#
protected $ptDirectory
#
protected $ptThumbnail
#
protected $ptHandle
#
protected $ptURL
#

Properties inherited from Concrete5_Library_Object

$error