ZMObject
└─ZMTheme
public class ZMTheme
extends ZMObject
| Fields inherited from org.zenmagick.core\ZMObject | |
|---|---|
| properties_ | |
| Method Summary | |
|---|---|
| void | __construct(mixed themeId, array properties) Create new instance. |
| string | Return the full filename for the themes base directory. |
| string | Return the path of the boxes directory. |
| mixed | getConfig(string key) Get theme config. |
| string | Return the path of the content directory. |
| string | Return the path of the extra directory. |
| string | Return the path of the lang directory. |
| string | getName() Set theme name. |
| array | getStaticPageList(boolean includeDefaults, int languageId) Get a list of available static pages. |
| string | Get this themes id. |
| string | Return the path of the views directory. |
| void | loadLocale(ZMLanguage language) Load locale settings (l10n/i18n). |
| boolean | saveStaticPageContent(string page, string contents, int languageId) Write the content of a static (define) page. |
| void | setConfig(array config) Set full theme config. |
| void | setConfigValue(mixed key, mixed value) Set theme config value. |
| string | staticPageContent(string page, int languageId) Get the content of a static (define) page. |
| string | themeFile(string name, string baseDir) Resolve a theme relative filename into a full path. |
| boolean | themeFileExists(string name, string baseDir) Check if the given theme relative file exists. |
| string | themeURL(string uri) Resolve a theme relative URI. |
| Methods inherited from org.zenmagick.core\ZMObject | |
|---|---|
| __construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set | |
public void __construct(mixed themeId, array properties)
Create new instance.
public string getBaseDir()
Return the full filename for the themes base directory.
public string getBoxesDir()
Return the path of the boxes directory.
public mixed getConfig(string key)
Get theme config.
null to return the full map.null for unknown keys.public string getContentDir()
Return the path of the content directory.
public string getExtraDir()
Return the path of the extra directory.
public string getLangDir()
Return the path of the lang directory.
public string getName()
Set theme name.
public array getStaticPageList(boolean includeDefaults, int languageId)
Get a list of available static pages.
true, default pages will be included; default is false.public string getThemeId()
Get this themes id.
public string getViewsDir()
Return the path of the views directory.
public void loadLocale(ZMLanguage language)
Load locale settings (l10n/i18n).
NOTE: This is only going to load mappings. However, since i18n
settings need to be set using define(..), this is done
in a separate function, once loading (and theme switching) is over.
public boolean saveStaticPageContent(string page, string contents, int languageId)
Write the content of a static (define) page.
public void setConfig(array config)
Set full theme config.
public void setConfigValue(mixed key, mixed value)
Set theme config value.
public string staticPageContent(string page, int languageId)
Get the content of a static (define) page.
null.public string themeFile(string name, string baseDir)
Resolve a theme relative filename into a full path.
content/public boolean themeFileExists(string name, string baseDir)
Check if the given theme relative file exists.
content/true if the file exists, false if not.public string themeURL(string uri)
Resolve a theme relative URI.
The given uri is assumed to be relative to the themes content folder.
A theme.