Class Theme

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.).

Concrete\Core\Foundation\Object
Extended by Concrete\Core\Page\Theme\Theme
Namespace: Concrete\Core\Page\Theme
Package: Pages
Subpackages: Themes
Located at src/Page/Theme/Theme.php

Methods summary

public
public static
public static
public static
public static
# getList( $where = null )
public static
public
# providesAsset( $assetType, $assetHandle = null )
public
public static
# getAvailableThemes( $filterInstalled = true )
public static
# getByFileHandle( $handle, $dir = DIR_FILES_THEMES, $pkgHandle = '' )
public boolean
# isThemeCustomizable( )

Checks the theme for a styles.xml file (which is how customizations happen.).

public Concrete\Core\StyleCustomizer\StyleList
# getThemeCustomizableStyleList( )

Gets the style list object for this theme.

public
# getThemeCustomizablePreset( $handle )

Gets a preset for this theme by handle.

public
# getThemeCustomizableStylePresets( )

Gets all presets available to this theme.

public
public
public
public
public
# getStylesheetObject( $stylesheet )
public string
# getStylesheet( string $stylesheet )

Looks into the current CSS directory and returns a fully compiled stylesheet when passed a LESS stylesheet. Also serves up custom value list values for the stylesheet if they exist.

public
# getThemeCustomStyleObject( )

Returns a Custom Style Object for the theme if one exists.

public ValueList
# getThemeCustomStyleObjectValues( )

Returns the value list of the custom style object if one exists.

public
# setCustomStyleObject( Concrete\Core\StyleCustomizer\Style\ValueList $valueList, $selectedPreset = false, $customCssRecord = false )
public static PageTheme
# getByHandle( string $pThemeHandle )
public static PageTheme
# getByID( integer $pThemeID )
protected static Concrete\Core\Page\Theme\Theme|null
# populateThemeQuery( string $where, array $args )
public static
# add( $pThemeHandle, $pkg = null )
public
public
# export( $node )
public static
# exportList( $xml )
protected static
# install( $dir, $pThemeHandle, $pkgID )
public
public
public
public string
# getThemeDisplayName( string $format = 'html' )

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

public
public
public
# hasCustomClass( )

Returns whether a theme has a custom class.

public
public
public
# getThemeDisplayDescription( $format = 'html' )
public
public
public
public
# setThemeURL( $pThemeURL )
public
# setThemeDirectory( $pThemeDirectory )
public
# setThemeHandle( $pThemeHandle )
public
public
public
public
public
public
public
public static static
# getSiteTheme( )
public
public
public
public Concrete\Core\Page\Theme\GridFramework\GridFramework|null
public
public
public
public
public
public
public
public

Constants summary

integer E_THEME_INSTALLED
# 1
string THEME_EXTENSION
# '.php'
string THEME_CUSTOMIZABLE_STYLESHEET_EXTENSION
# '.less'
string FILENAME_TYPOGRAPHY_CSS
# 'typography.css'

Properties summary

protected $pThemeName
#
protected $pThemeID
#
protected $pThemeDescription
#
protected $pThemeDirectory
#
protected $pThemeThumbnail
#
protected $pThemeHandle
#
protected $pThemeURL
#
protected boolean $pThemeIsPreview
# false
protected $pkgID
#
protected $stylesheetCachePath
#
protected $stylesheetCacheRelativePath
# REL_DIR_FILES_CACHE
protected boolean $pThemeGridFrameworkHandle

Special items meant to be extended by custom theme classes.

# false

Properties inherited from Concrete\Core\Foundation\Object

$error