PHP Class Horde_Themes_Css, horde

Copyright 2010-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Michael Slusarz ([email protected])
Mostrar archivo Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_cacheid string The theme cache ID.
$_cssFiles array A list of additional stylesheet files to add to the output.
$_cssThemeFiles array A list of additional themed stylesheet files to add to the output.

Public Methods

Method Description
addStylesheet ( string $file, string $url ) Adds an external stylesheet to the output.
addThemeStylesheet ( string $file ) Adds a themed stylesheet to the output.
getBaseStylesheetList ( ) : array Returns the list of base stylesheets, based on the current language and browser settings.
getStylesheetUrls ( array $opts = [] ) : array Generate the stylesheet URLs needed to display the current page.
getStylesheets ( mixed $theme = '', array $opts = [] ) : array Return the list of base stylesheets to display.
loadCssFiles ( array $files ) : string Loads CSS files, cleans up the input, and concatenates to a string.

Method Details

addStylesheet() public method

Adds an external stylesheet to the output.
public addStylesheet ( string $file, string $url )
$file string The CSS filepath.
$url string The CSS URL.

addThemeStylesheet() public method

Adds a themed stylesheet to the output.
public addThemeStylesheet ( string $file )
$file string The stylesheet name.

getBaseStylesheetList() public method

Returns the list of base stylesheets, based on the current language and browser settings.
public getBaseStylesheetList ( ) : array
return array A list of base CSS files to load.

getStylesheetUrls() public method

Honors configuration choices as to stylesheet caching.
public getStylesheetUrls ( array $opts = [] ) : array
$opts array Additional options:
  - app: (string) The current application.
  - nobase: (boolean) If true, don't load base stylesheets.
  - nocache: (boolean) If true, don't load files from cache.
  - nohorde: (boolean) If true, don't load files from Horde.
  - sub: (string) A subdirectory containing additional CSS files to
         load as an overlay to the base CSS files.
  - subonly: (boolean) If true, only load the files in 'sub', not
             the default theme files.
  - theme: (string) Use this theme instead of the default.
  - themeonly: (boolean) If true, only load the theme files.
return array The list of URLs to display (Horde_Url objects).

getStylesheets() public method

Return the list of base stylesheets to display.
public getStylesheets ( mixed $theme = '', array $opts = [] ) : array
$theme mixed The theme to use; specify an empty value to retrieve the theme from user preferences, and false for no theme.
$opts array Additional options:
  - app: (string) The current application.
  - nobase: (boolean) If true, don't load base stylesheets.
  - nohorde: (boolean) If true, don't load files from Horde.
  - sub: (string) A subdirectory containing additional CSS files to
         load as an overlay to the base CSS files.
  - subonly: (boolean) If true, only load the files in 'sub', not
             the default theme files.
  - themeonly: (boolean) If true, only load the theme files.
return array An array of 2-element array arrays containing 2 keys:
  - app: (string) App of the CSS file.
  - fs: (string) Filesystem location of stylesheet.
  - uri: (string) URI of stylesheet.

loadCssFiles() public method

Loads CSS files, cleans up the input, and concatenates to a string.
Deprecation: Use Horde_Themes_Css_Compress instead.
public loadCssFiles ( array $files ) : string
$files array List of CSS files as returned from getStylesheets().
return string CSS data.

Property Details

$_cacheid protected_oe property

The theme cache ID.
protected string $_cacheid
return string

$_cssFiles protected_oe property

A list of additional stylesheet files to add to the output.
protected array $_cssFiles
return array

$_cssThemeFiles protected_oe property

A list of additional themed stylesheet files to add to the output.
protected array $_cssThemeFiles
return array