[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
[Code source] [Imprimer] [Statistiques]
This file implements the Admin UI class. Admin skins should derive from this class and override {@link get_template()} for example. This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}. See also {@link http://sourceforge.net/projects/evocms/}.
Author: | blueyed: Daniel HAHLER |
Author: | fplanque: Francois PLANQUE. |
Copyright: | (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/}. |
License: | http://b2evolution.net/about/license.html GNU General Public License (GPL) |
Version: | $Id: _adminUI_general.class.php,v 1.72 2007/11/02 02:37:37 fplanque Exp $ |
Poids: | 1729 lignes (52 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
AdminUI_general:: (34 méthodes):
AdminUI_general()
init_templates()
add_menu_entries()
unshift_menu_entries()
get_title()
get_title_for_titlearea()
append_to_titlearea()
get_html_title()
get_properties_for_path()
get_prop_for_node()
get_prop_for_path()
get_html_menu()
disp_html_head()
disp_body_top()
disp_global_footer()
disp_payload_begin()
disp_payload_end()
disp_view()
get_html_collection_list()
get_html_menu_entries()
get_menu_entries()
get_selected()
get_template()
get_bloglist_buttons()
get_path()
get_path_range()
set_path_level()
append_path_level()
set_path()
init_menus()
get_body_top()
get_body_bottom()
get_page_head()
get_footer_contents()
Classe: AdminUI_general - X-Ref
The general Admin UI class. It provides functions to handle the UI part of theAdminUI_general() X-Ref |
Constructor. |
init_templates() X-Ref |
This function should init the templates - like adding Javascript through the {@link add_headline()} method. |
add_menu_entries( $path, $entries ) X-Ref |
Add menu entries to the list of entries for a given path. param: NULL|string|array The path to add the entries to. See {@link get_node_by_path()}. param: array Menu entries to add (key (string) => entry (array)). |
unshift_menu_entries( $path, $entries ) X-Ref |
Add menu entries to the beginning of the list for given path. param: NULL|string|array The path to add the entries to. param: array Menu entries to add (key (string) => entry (array)). |
get_title( $reversedDefault = false ) X-Ref |
Get the <title> of the page. This is either {@link $title} or will be constructed from title/text properties of the path entries. param: boolean If true, the fallback will be in reversed order return: string |
get_title_for_titlearea() X-Ref |
Get the title for the titlearea (<h1>). This is the current path in the site structure return: string |
append_to_titlearea( $string ) X-Ref |
Append a string at the end of the existing titlearea. We actually keep the appended stuff separate from the main title, because the main title might in some occasions not be known immediately. param: string What to append to the titlearea |
get_html_title() X-Ref |
Get the title for HTML <title> tag. If no explicit title has been specified, auto construct one from path. return: string |
get_properties_for_path( $path, $prop_by_pref ) X-Ref |
Get a list of properties for a given path for a set of property names to check. The result is a list of properties for each node down the path. The property names must be given in $prop_by_ref, ordered by preference. param: string|array The path. See {@link get_node_by_path()}. param: array Alternative names of the property to receive (ordered by priority). return: array List of the properties. |
get_prop_for_node( $path, $prop_by_pref ) X-Ref |
Get a property of a node, given by path. param: string|array The path. See {@link get_node_by_path()}. param: array Alternative names of the property to receive (ordered by priority). return: mixed|false False if property is not set for the node, otherwise its value. |
get_prop_for_path( $depth, $prop_by_pref ) X-Ref |
Get a property for a specific path entry. param: int The numeric index of the path entry to query (0 is first). param: array A list of properties to check, ordered by priority. return: mixed|false The first found property or false if it does not exist |
get_html_menu( $path = NULL, $template = 'main' ) X-Ref |
Get a menu, any level. param: NULL|string|array The path. See {@link get_node_by_path()}. param: string The template name, see {@link get_template()}. |
disp_html_head() X-Ref |
Display doctype + <head>...</head> section |
disp_body_top() X-Ref |
Dsiplay the top of the HTML <body>... Typically includes title, menu, messages, etc. |
disp_global_footer() X-Ref |
Display body bottom, debug info and close </html> |
disp_payload_begin() X-Ref |
Display the start of a payload block Note: it is possible to display several payload blocks on a single page. The first block uses the "sub" template, the others "block". |
disp_payload_end() X-Ref |
Display the end of a payload block Note: it is possible to display several payload blocks on a single page. The first block uses the "sub" template, the others "block". |
disp_view( $view_name, $view_params = array() X-Ref |
Display a view Note: doing the require inside of a function has the side effect of forcing the view to declare any global object it wants to use. This can be a little tedious but on the other hand it has the advantage of clearly showing what objects are used and makes it easier to audit the views in order to determine if they include more business logic than they ought to. param: string param: array params to be used in the view (optional) |
get_html_collection_list( $permname = 'blog_ismember', $permlevel = 1, $url_format = '?blog=%d', $all_title = NULL, $all_url = '', $onclick = NULL, $name = NULL ) X-Ref |
Returns the list of available Collections (aka Blogs) to work on. param: string name of required permission needed to display the blog in the list param: string level of required permission needed to display the blog in the list param: string Url format string for elements, with %d for blog number. param: string Title for "all" button param: string URL for "all" button param: string onclick attribute format string, with %d for blog number. param: string name attribute for each button (%d for blog number) return: string HTML |
get_html_menu_entries( $path, $template, $depth = 0 ) X-Ref |
Get the HTML for the menu entries of a specific path. param: NULL|string|array The path. See {@link get_node_by_path()}. param: string Template name, see {@link get_template()}. param: int Depth (recursion) return: string The HTML for the menu. |
get_menu_entries( $path ) X-Ref |
Get menu entries for a given path. param: NULL|string|array The path. See {@link get_node_by_path()}. return: array The menu entries (may be empty). |
get_selected( $path ) X-Ref |
Get the key of a selected entry for a path. param: NULL|string|array The path. See {@link get_node_by_path()}. return: string|false |
get_template( $name, $depth = 0 ) X-Ref |
Pas de description |
get_bloglist_buttons( $before = '', $after = '' ) X-Ref |
return: string |
get_path( $which, $withProps = false ) X-Ref |
Get a path key by numeric key. Starts with 0. param: integer The numeric index of the path (0 is first). param: boolean Also return properties? return: string|array|false (depends on $withProps) |
get_path_range( $start, $end = NULL ) X-Ref |
Get tghe list of path keys in a given range. param: integer start index param: integer|NULL end index (NULL means same as start index) return: array List of path keys. |
set_path_level( $level, $pathKey, $pathProps = array() X-Ref |
Set a specific path level (specific depth). First level is 0, then the first subpath/submenu is level 1, etc. E.g., if plugins.php gets called, there could be a call to $AdminUI->set_path_level( 0, 'plugins' ), which selects this entry from the menu. If a specific tab is called inside of plugins.php, there could be a call to $AdminUI->set_path_level( 1, $tab ) Though, it is recommended to call the wrapper functions: - {@link append_path_level()} - {@link set_path()} This also marks the parent node as selected and checks for permissions. param: integer Path level to set (starts at 0) param: array Either the key of the path or an array(keyname, propsArray). param: array Properties for this path entry. return: boolean DEPRECATED True if perm granted, false if not (and we're not exiting). |
append_path_level( $path, $pathProps = array() X-Ref |
Append a selected menu entry to the current path of selected entries. param: string|array Either the key of the path or an array(keyname, propsArray). |
set_path( ) X-Ref |
Set the full selected path. For example, this selects the tab/submenu 'plugins' in the main menu 'options': <code> set_path( 'options', 'plugins' ); </code> Use {@link append_path_level()} to append a single path element. This is an easy stub for {@link set_path_level()}. param: string|array,... VARIABLE NUMBER OF ARGUMENTS. Each is either the key of a path entry or an array(keyname, propsArray). |
init_menus() X-Ref |
Init the menus. Do this as late as possible. Especially after determining the blog ID we work on. This allows to check for proper permissions and build correct cross navigation links. |
get_body_top() X-Ref |
Get the top of the HTML <body>. return: string |
get_body_bottom() X-Ref |
Get the end of the HTML <body>. Close open divs, etc... return: string |
get_page_head() X-Ref |
GLOBAL HEADER - APP TITLE, LOGOUT, ETC. return: string |
get_footer_contents() X-Ref |
Get the footer text |
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |