Base class for CMSMS Admin themes.
This is an abstract class that is used for building CMSMS Admin Themes. This is also a singleton object.
package |
CMS |
---|---|
license |
GPL |
since | 1.11 |
author |
Robert Campbell |
property-read |
Return the theme name |
property-read |
Return the current logged in userid (deprecated) |
property-read |
The current page title |
property-read |
The current page subtitle |
SetTitle(string $str)
This is used in the admin to set the title for the page, and for the visible page header. Note: if no title is specified, the theme will try to calculate one automatically.
string
$strThe page title.
SetSubTitle(string $str)
This is used in the admin to set the title for the page, and for the visible page header. Note: if no title is specified, the theme will try to calculate one automatically.
string
$strThe page subtitle.
HasPerm(string $permission) : boolean
Check if the user has one of the aggregate permissions
string
$permissionthe permission to check.
boolean
set_action_module(string $module_name)
string
$module_namethe module name.
get_action_module() : string
string
the module name for the current request, if any.
get_module_help_url(string $module_name = null)
string
$module_nameget_bookmarks(boolean $pure = FALSE) : array
boolean
$pureif False the shortcuts for adding and managing bookmarks are added to the list.
array
Array of Bookmark objects
get_active_title() : string
string
set_value(string $key, mixed $value)
string
$keymixed
$valueget_value(string $key)
string
$keyHasDisplayableChildren(string $section) : boolean
string
$sectionsection to test
boolean
DisplayImage(string $imageName, string $alt = '', integer $width = '', integer $height = '', string $class = '')
string
$imageNamename of image
string
$altalt text
integer
$widthwidth
integer
$heightheight
string
$classclass
ShowErrors(mixed $errors, string $get_var = '')
mixed
$errorsThe errors, either a string, or an array of strings
string
$get_varAn optional get variable name that can contain an error string key. If specified, errors is ignored.
ShowMessage(mixed $message, string $get_var = '')
mixed
$messageThe message, either a string, or an array of stri9ngs
string
$get_varAn optional get variable name that can contain an error string key. If specified, message param is ignored.
ShowHeader(string $title_name, array $extra_lang_params = array(), string $link_text = '', mixed $module_help_type = FALSE)
string
$title_nameThe name to show on the header. This will not be passed through the lang process if module_help_type is not FALSE.
array
$extra_lang_paramsExtra language parameters to pass to the title_name. Ignored if module_help_type is not FALSE
string
$link_textText to show in the module help link (depends on the module_help_type param)
mixed
$module_help_typeFlag for how to display module help types. Possible values are TRUE to display a simple link, FALSE for no help, and 'both' for both types of links
GetDefaultTheme()
GetAvailableThemes() : array
array
A hash of strings.
GetThemeObject(string $name = '') : \CmsAdminThemeBase
This method will create the admin theme object if has not yet been created. It will read the cms preferences and cross reference with available themes.
string
$nameoptional theme name.
Reference to the initialized admin theme.
add_notification(\CmsAdminThemeNotification &$notification)
AddNotification(integer $priority, string $module, string $html)
This is simply a compatibility wrapper around the add_notification method.
integer
$prioritypriority level between 1 and 3
string
$moduleThe module name.
string
$htmlThe contents of the notification
get_notifications() : Array
Array
Array of CmsAdminThemeNotification objects
BackUrl()
add_headtext(string $txt)
The CMSMS core code calls this method to add text and javascript to output in the head section required for various functionality.
string
$txtThe text to add to the head section.
get_headtext() : string
This method is typically called by the admin theme itself to get the text to render.
string
do_header() : string
string
html contents.
do_toppage(string $section_name) : string
string
$section_nameThe section name. An empty string indicates that a navigation of all top level items should be created.
string
html contents.
do_login(array $params) : string
array
$params string
html contents for the login page.
postprocess(string $html) : string
Many admin themes will do most of their work in this method (passing the html contents through a smarty template etc).
string
$htmlHTML contents
string
the HTML contents of the entire page.
StartTabHeaders() : string
string
SetTabHeader(string $tabid, string $title, boolean $active = false) : string
i.e: echo $this->SetTabHeader('preferences',$this->Lang('preferences'));
string
$tabidThe tab id
string
$titleThe tab title
boolean
$activeA flag indicating wether this tab is active.
string
EndTabHeaders() : string
string
StartTabContent() : string
string
EndTabContent() : string
string
StartTab(string $tabid, array $params = array()) : string
string
$tabidThe tabid (see SetTabHeader)
array
$paramsParameters
string
EndTab() : string
string
themeName : string
Return the theme name
string
userid : integer
Return the current logged in userid (deprecated)
integer
title : string
The current page title
string
subtitle : string
The current page subtitle
string