Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

AdminHandler Class Reference

Inheritance diagram for AdminHandler:
Collaboration diagram for AdminHandler:

List of all members.

Public Member Functions

 __construct ()
 setup_admin_theme ($page, $type= '')
 act_admin ()
 act_admin_ajax ()
 get_sysinfo ()
 get_blank ($content= '')
 default_post_type_display ($type, $foruse)
 create_theme ()

Static Public Member Functions

static setup_stacks ()

Protected Member Functions

 get_main_menu ($theme)
 filter_menus_by_permission ($menuarray)
 set_admin_template_vars ($theme)
 display ($template_name)

Protected Attributes

 $active_theme = null

Detailed Description

Habari AdminHandler Class Backbone of the admin area, handles requests and functionality.

Todo:
Split into page-specific controllers. Discussion: See http://groups.google.com/group/habari-dev/browse_thread/thread/9c469a4fcb61c814 Branch: https://trac.habariproject.org/habari/browser/branches/adminhandler Related branch: http://trac.habariproject.org/habari/browser/branches/handlers

Definition at line 16 of file adminhandler.php.


Constructor & Destructor Documentation

AdminHandler::__construct (  ) 

Verifies user credentials before creating the theme and displaying the request.

Definition at line 24 of file adminhandler.php.


Member Function Documentation

AdminHandler::act_admin (  ) 

Dispatches the request to the defined method. (ie: post_{page})

Definition at line 106 of file adminhandler.php.

AdminHandler::act_admin_ajax (  ) 

Handle incoming requests to /admin_ajax for admin ajax requests

Definition at line 170 of file adminhandler.php.

AdminHandler::default_post_type_display ( type,
foruse 
)

How to display the built-in post types.

Definition at line 570 of file adminhandler.php.

AdminHandler::display ( template_name  )  [protected]
AdminHandler::filter_menus_by_permission ( menuarray  )  [protected]

Remove menus for which the user does not have qualifying permissions.

Parameters:
array $menuarray The master array of admin menu items
Returns:
array The modified array of admin menu items

Definition at line 383 of file adminhandler.php.

Referenced by get_main_menu().

AdminHandler::get_blank ( content = ''  ) 

Display a blank admin page with appropriate navigation. This function terminates execution before returning. Useful for displaying errors when permission is denied for viewing.

Parameters:
string $content Optional default content to display

Definition at line 260 of file adminhandler.php.

Referenced by act_admin(), AdminPostsHandler::get_publish(), and AdminUsersHandler::get_user().

AdminHandler::get_main_menu ( theme  )  [protected]

Assembles the main menu for the admin area.

Parameters:
Theme $theme The theme to add the menu to

Definition at line 272 of file adminhandler.php.

Referenced by set_admin_template_vars().

AdminHandler::get_sysinfo (  ) 

Handles get requests for the system information page.

Definition at line 190 of file adminhandler.php.

AdminHandler::set_admin_template_vars ( theme  )  [protected]

Assigns the main menu to $mainmenu into the theme.

Definition at line 588 of file adminhandler.php.

Referenced by setup_admin_theme().

AdminHandler::setup_admin_theme ( page,
type = '' 
)

Create the admin theme instance

Parameters:
string $page The admin page requested
string $type The content type included in the request

Definition at line 79 of file adminhandler.php.

Referenced by act_admin(), AdminThemesHandler::ajax_add_block(), AdminThemesHandler::ajax_delete_block(), and AdminThemesHandler::ajax_save_areas().

static AdminHandler::setup_stacks (  )  [static]

Setup the default admin javascript stack here so that it can be called from plugins, etc. This is not an ideal solution, but works for now.

Definition at line 607 of file adminhandler.php.

Referenced by __construct().


Member Data Documentation

AdminHandler::$active_theme = null [protected]

An instance of the active public theme, which allows plugin hooks to execute

Definition at line 19 of file adminhandler.php.

Referenced by AdminDashboardHandler::get_dashboard().


The documentation for this class was generated from the following file: