\Horde_Themes

An interface to handling Horde theme elements.

Summary

Methods
Properties
Constants
img()
sound()
themeList()
soundList()
getFeedXsl()
viewDir()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

img()

img(string  $name = null, mixed  $options = array()) : \Horde_Themes_Image

Return the path to an image, using the default image if the image does not exist in the current theme.

Parameters

string $name

The image name. If null, will return the image directory.

mixed $options

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.

Returns

\Horde_Themes_Image

An object which contains the URI and filesystem location of the image.

sound()

sound(string  $name = null, mixed  $options = array()) : \Horde_Themes_Sound

Return the path to a sound, using the default sound if the sound does not exist in the current theme.

Parameters

string $name

The sound name. If null, will return the sound directory.

mixed $options

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.

Returns

\Horde_Themes_Sound

An object which contains the URI and filesystem location of the sound.

themeList()

themeList() : array

Returns a list of available themes.

Throws

\UnexpectedValueException

Returns

array —

Keys are theme names, values are theme descriptions.

soundList()

soundList(string  $app = null, string  $theme = null) : array

Returns a list of available sounds.

Parameters

string $app

The app to search in.

string $theme

The theme to search in.

Returns

array —

An array of Horde_Themes_Sound objects. Keys are the base filenames.

getFeedXsl()

getFeedXsl() : string

Return the location of the feed XSL file.

As of now, this file MUST live in horde/themes/default/feed-rss.xsl.

Returns

string —

Path to the feed file.

viewDir()

viewDir(integer  $view) : string

Return the view-specific directory for a Horde view.

Parameters

integer $view

The Horde view type.

Returns

string —

The directory prefix.