PHP Class Horde_Themes, horde

Author: Michael Slusarz ([email protected])
Exibir arquivo Open project: horde/horde Class Usage Examples

Public Methods

Method Description
getFeedXsl ( ) : string Return the location of the feed XSL file.
img ( string $name = null, mixed $options = [] ) : Horde_Themes_Image Return the path to an image, using the default image if the image does not exist in the current theme.
sound ( string $name = null, mixed $options = [] ) : Horde_Themes_Sound Return the path to a sound, using the default sound if the sound does not exist in the current theme.
soundList ( string $app = null, string $theme = null ) : array Returns a list of available sounds.
themeList ( ) : array Returns a list of available themes.
viewDir ( integer $view ) : string Return the view-specific directory for a Horde view.

Method Details

getFeedXsl() public static method

As of now, this file MUST live in horde/themes/default/feed-rss.xsl.
public static getFeedXsl ( ) : string
return string Path to the feed file.

img() public static method

Return the path to an image, using the default image if the image does not exist in the current theme.
public static img ( string $name = null, mixed $options = [] ) : Horde_Themes_Image
$name string The image name. If null, will return the image directory.
$options mixed Additional options. If a string, is taken to be the 'app' parameter. If an array, the following options are available: - app: (string) Use this application instead of the current app. - nohorde: (boolean) If true, do not fallback to horde for image. - noview: (boolean) If true, do not load images from view-specific directories. (Since 2.4.0) - theme: (string) Use this theme instead of the Horde default.
return Horde_Themes_Image An object which contains the URI and filesystem location of the image.

sound() public static method

Return the path to a sound, using the default sound if the sound does not exist in the current theme.
public static sound ( string $name = null, mixed $options = [] ) : Horde_Themes_Sound
$name string The sound name. If null, will return the sound directory.
$options mixed Additional options. If a string, is taken to be the 'app' parameter. If an array, the following options are available: - app: (string) Use this application instead of the current app. - nohorde: (boolean) If true, do not fallback to horde for sound. - noview: (boolean) If true, do not load images from view-specific directories. (Since 2.4.0) - theme: (string) Use this theme instead of the Horde default.
return Horde_Themes_Sound An object which contains the URI and filesystem location of the sound.

soundList() public static method

Returns a list of available sounds.
public static soundList ( string $app = null, string $theme = null ) : array
$app string The app to search in.
$theme string The theme to search in.
return array An array of Horde_Themes_Sound objects. Keys are the base filenames.

themeList() public static method

Returns a list of available themes.
public static themeList ( ) : array
return array Keys are theme names, values are theme descriptions.

viewDir() public static method

Return the view-specific directory for a Horde view.
Since: 2.4.0
public static viewDir ( integer $view ) : string
$view integer The Horde view type.
return string The directory prefix.