Class PageTheme

Description

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

Located in /models/page_theme.php (line 157)

Object
   |
   --PageTheme
Class Constant Summary
Variable Summary
 mixed $ptDirectory
 mixed $ptHandle
 mixed $ptID
 mixed $ptName
 mixed $ptThumbnail
 mixed $ptURL
Method Summary
 static void getAvailableThemes ([ $filterInstalled = true])
 static void getByFileHandle ( $handle, [ $dir = DIR_FILES_THEMES])
 static void getGlobalList ()
 static void getInstalledHandles ()
 static void getList ([ $where = null])
 static void getListByPackage ( $pkg)
 static void getLocalList ()
 void add ( $ptHandle, [ $pkg = null])
 void applyToSite ()
 void getByHandle ( $ptHandle)
 void getByID ( $ptID)
 array getEditableStylesList (string $file)
 void getFilesInTheme ()
 void getPackageID ()
 void getSiteTheme ()
 void getThemeHandle ()
 void getThemeID ()
 void getThemeName ()
 void getThemeURL ()
 void isUninstallable ()
 void mergeStylesFromPost ( $post)
 void outputStyleSheet (string $file, [ $styles = false])
 void parseStyleSheet ( $file, [ $styles = false])
 void populateThemeQuery ( $where,  $args)
 void reset ()
 void saveEditableStyles (array $styles)
 void uninstall ()
Variables
mixed $ptDescription (line 161)
  • access: protected
mixed $ptDirectory (line 162)
  • access: protected
mixed $ptHandle (line 164)
  • access: protected
mixed $ptID (line 160)
  • access: protected
mixed $ptName (line 159)
  • access: protected
mixed $ptThumbnail (line 163)
  • access: protected
mixed $ptURL (line 165)
  • access: protected
Methods
static getAvailableThemes (line 204)
  • access: public
void getAvailableThemes ([ $filterInstalled = true])
  • $filterInstalled
static getByFileHandle (line 239)
  • access: public
void getByFileHandle ( $handle, [ $dir = DIR_FILES_THEMES])
  • $handle
  • $dir
static getGlobalList (line 172)
  • access: public
void getGlobalList ()
static getInstalledHandles (line 199)
  • access: public
void getInstalledHandles ()
static getList (line 184)
  • access: public
void getList ([ $where = null])
  • $where
static getListByPackage (line 180)
  • access: public
void getListByPackage ( $pkg)
  • $pkg
static getLocalList (line 176)
  • access: public
void getLocalList ()
add (line 515)
  • access: public
void add ( $ptHandle, [ $pkg = null])
  • $ptHandle
  • $pkg
applyToSite (line 627)
  • access: public
void applyToSite ()
getByHandle (line 461)
  • access: public
void getByHandle ( $ptHandle)
  • $ptHandle
getByID (line 474)
  • access: public
void getByID ( $ptID)
  • $ptID
getEditableStylesList (line 422)

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

  • access: public
array getEditableStylesList (string $file)
  • string $file
getFilesInTheme (line 536)
  • access: public
void getFilesInTheme ()
getPackageHandle (line 605)
  • access: public
void getPackageHandle ()
getPackageID (line 604)
  • access: public
void getPackageID ()
getSiteTheme (line 634)
  • access: public
void getSiteTheme ()
getThemeDescription (line 609)
  • access: public
void getThemeDescription ()
getThemeDirectory (line 610)
  • access: public
void getThemeDirectory ()
getThemeEditorCSS (line 612)
  • access: public
void getThemeEditorCSS ()
getThemeHandle (line 608)
  • access: public
void getThemeHandle ()
getThemeID (line 602)
  • access: public
void getThemeID ()
getThemeName (line 603)
  • access: public
void getThemeName ()
getThemeThumbnail (line 616)
  • access: public
void getThemeThumbnail ()
getThemeURL (line 611)
  • access: public
void getThemeURL ()
isUninstallable (line 613)
  • access: public
void isUninstallable ()
mergeStylesFromPost (line 310)
  • access: public
void mergeStylesFromPost ( $post)
  • $post
outputStyleSheet (line 263)

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.

  • access: public
void outputStyleSheet (string $file, [ $styles = false])
  • string $file
  • $styles
parseStyleSheet (line 267)
  • access: public
void parseStyleSheet ( $file, [ $styles = false])
  • $file
  • $styles
populateThemeQuery (line 487)
  • access: protected
void populateThemeQuery ( $where,  $args)
  • $where
  • $args
reset (line 354)

Removes any custom styles by clearing them out of the database

  • access: public
void reset ()
saveEditableStyles (line 369)

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

  • access: public
void saveEditableStyles (array $styles)
  • array $styles
uninstall (line 639)
  • access: public
void uninstall ()
Class Constants
E_THEME_INSTALLED = 1 (line 167)
FILENAME_EXTENSION_CSS = "css" (line 170)
FILENAME_TYPOGRAPHY_CSS = "typography.css" (line 169)
THEME_EXTENSION = ".php" (line 168)

Documentation generated on Thu, 15 Sep 2011 16:36:29 -0700 by phpDocumentor 1.4.1