Class AdminHandler

Description

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

  • todo: Clean this mess up

Located in /system/classes/adminhandler.php (line 10)

ActionHandler
   |
   --AdminHandler
Variable Summary
Method Summary
AdminHandler __construct ()
void act_admin ()
void act_admin_ajax ()
void ajax_comments ()
void ajax_dashboard ( $handler_vars)
void ajax_delete_entries ( $handler_vars)
void ajax_delete_logs ( $handler_vars)
void ajax_in_edit ( $handler_vars)
void ajax_logs ()
void ajax_media ( $handler_vars)
void ajax_media_panel ( $handler_vars)
void ajax_posts ()
void ajax_tags ( $handler_vars)
void ajax_update_comment ( $handler_vars)
void ajax_update_users ( $handler_vars)
void ajax_users ()
void dash_additem (object form $form)
void display (template_name $template_name)
void fetch_comments ([ $params = array()])
void filter_dash_module_add_item ( $module,  $id,  $theme)
void form_comment ( $comment,  $actions)
void form_publish ( $post, [ $newpost = true])
void get_comment ([ $update = FALSE])
void get_comments ()
void get_dashboard ()
void get_groups ()
void get_logs ()
void get_main_menu (Theme $theme)
void get_options ()
void get_plugins ()
void get_posts ()
void get_publish ([ $template = 'publish'])
void get_tags ()
void get_themes ()
void get_user ()
void get_users ()
void post_comment ()
void post_comments ()
void post_dashboard ()
void post_groups ()
void post_import ()
void post_logs ()
void post_options ()
void post_plugins ()
void post_posts ()
void post_publish ()
void post_themes ()
void post_user ()
void post_users ()
void set_admin_template_vars ( $theme)
void update_users ( $handler_vars)
Variables
mixed $active_theme = NULL (line 15)

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

  • access: protected

Inherited Variables

Inherited from ActionHandler

ActionHandler::$action
ActionHandler::$handler_vars
Methods
Constructor __construct (line 20)

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

  • access: public
AdminHandler __construct ()
act_admin (line 68)

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

  • access: public
void act_admin ()
act_admin_ajax (line 126)

Handle incoming requests to /admin_ajax for admin ajax requests

  • access: public
void act_admin_ajax ()
ajax_comments (line 1722)

Handles ajax requests from the manage comments page

  • access: public
void ajax_comments ()
ajax_dashboard (line 1648)

Handles ajax requests from the dashboard

  • access: public
void ajax_dashboard ( $handler_vars)
  • $handler_vars
ajax_delete_entries (line 1809)

handles AJAX from /manage/entries

used to delete entries

  • access: public
void ajax_delete_entries ( $handler_vars)
  • $handler_vars
ajax_delete_logs (line 1838)

handles AJAX from /logs

used to delete logs

  • access: public
void ajax_delete_logs ( $handler_vars)
  • $handler_vars
ajax_in_edit (line 1769)

handles AJAX from /comments

used to edit comments inline

  • access: public
void ajax_in_edit ( $handler_vars)
  • $handler_vars
ajax_logs (line 2124)

Handles ajax requests from the logs page

  • access: public
void ajax_logs ()
ajax_media (line 2441)
  • access: public
void ajax_media ( $handler_vars)
  • $handler_vars
ajax_media_panel (line 2468)
  • access: public
void ajax_media_panel ( $handler_vars)
  • $handler_vars
ajax_posts (line 1694)

Handles ajax requests from the manage posts page

  • access: public
void ajax_posts ()
ajax_tags (line 2287)

handles AJAX from /admin/tags

used to delete and rename tags

  • access: public
void ajax_tags ( $handler_vars)
  • $handler_vars
ajax_update_comment (line 1876)
  • access: public
void ajax_update_comment ( $handler_vars)
  • $handler_vars
ajax_update_users (line 756)

handles AJAX from /users

used to delete users and fetch new ones

  • access: public
void ajax_update_users ( $handler_vars)
  • $handler_vars
ajax_users (line 1751)

Handles ajax requests from the manage users page

  • access: public
void ajax_users ()
dash_additem (line 2516)

Adds a module to the user's dashboard

  • access: public
void dash_additem (object form $form)
  • object form $form: FormUI object
display (line 2436)

Helper function to assign all handler_vars into the theme and displays a theme template.

  • access: protected
void display (template_name $template_name)
  • template_name $template_name: Name of template to display (note: not the filename)
fetch_comments (line 1237)
  • access: public
void fetch_comments ([ $params = array()])
  • $params
fetch_dashboard_modules (line 365)

Fetches active modules for display on the dashboard

  • access: public
void fetch_dashboard_modules ()
filter_dash_module_add_item (line 2493)

Function used to set theme variables to the add module dashboard widget

TODO make this form use an AJAX call instead of reloading the page

  • access: public
void filter_dash_module_add_item ( $module,  $id,  $theme)
  • $module
  • $id
  • $theme
form_comment (line 1032)
  • access: public
void form_comment ( $comment,  $actions)
  • $comment
  • $actions
form_options_success (line 280)

Display a message when the site options are saved, and save those options

  • access: public
void form_options_success (FormUI $form)
  • FormUI $form: The successfully submitted form
form_publish (line 489)
  • access: public
void form_publish ( $post, [ $newpost = true])
  • $post
  • $newpost
get_activate_theme (line 1008)

Activates a theme.

  • access: public
void get_activate_theme ()
get_comment (line 1131)
  • access: public
void get_comment ([ $update = FALSE])
  • $update
get_comments (line 1200)
  • access: public
void get_comments ()
get_dashboard (line 299)

Handles get requests for the dashboard

  • todo: update check should probably be cron'd and cached, not re-checked every load
  • access: public
void get_dashboard ()
get_groups (line 2149)
  • access: public
void get_groups ()
get_logs (line 1939)

Handle GET requests for /admin/logs to display the logs

  • access: public
void get_logs ()
get_main_menu (line 2353)

Assembles the main menu for the admin area.

  • access: protected
void get_main_menu (Theme $theme)
  • Theme $theme: The theme to add the menu to
get_options (line 141)

Handles get requests from the options admin page

  • access: public
void get_options ()
get_plugins (line 1430)
  • access: public
void get_plugins ()
get_plugin_toggle (line 924)

Handles plugin activation or deactivation.

  • access: public
void get_plugin_toggle ()
get_posts (line 1606)

Handles GET requests to /admin/entries

  • access: public
void get_posts ()
get_publish (line 462)
  • access: public
void get_publish ([ $template = 'publish'])
  • $template
get_tags (line 2277)

Handle GET requests for /admin/tags to display the tags

  • access: public
void get_tags ()
get_themes (line 975)

Handles GET requests for the theme listing

  • access: public
void get_themes ()
get_user (line 631)
  • access: public
void get_user ()
get_users (line 853)
  • access: public
void get_users ()
post_comment (line 1196)
  • access: public
void post_comment ()
post_comments (line 1209)

Handles the submission of the comment moderation form.

  • todo: Separate delete from "delete until purge"
  • access: public
void post_comments ()
post_dashboard (line 290)

Handles post requests from the dashboard.

  • access: public
void post_dashboard ()
post_delete_post (line 611)

Deletes a post from the database.

  • access: public
void post_delete_post ()
post_groups (line 2154)
  • access: public
void post_groups ()
post_import (line 1022)

Handles the submission of the import form, importing data from a WordPress database.

This function should probably be broken into an importer class, since it is WordPress-specific.

  • access: public
void post_import ()
post_logs (line 1947)

Handle POST requests for /admin/logs to display the logs

  • access: public
void post_logs ()
post_options (line 149)

Handles posts requests from the options admin page

  • access: public
void post_options ()
post_plugins (line 1425)

A POST handler for the admin plugins page that simply passes those options through.

  • access: public
void post_plugins ()
post_posts (line 1615)

handles POST values from /manage/entries

used to control what content to show / manage

  • access: public
void post_posts ()
post_publish (line 396)

Handles post requests from the publish page.

  • access: public
void post_publish ()
post_themes (line 967)

A POST handler for the admin themes page that simply passes those options through.

  • access: public
void post_themes ()
post_user (line 650)

Handles post requests from the user profile page.

  • access: public
void post_user ()
post_users (line 861)

Handles post requests from the Users listing (ie: creating a new user)

  • access: public
void post_users ()
set_admin_template_vars (line 2427)

Assigns the main menu to $mainmenu into the theme.

  • access: protected
void set_admin_template_vars ( $theme)
  • $theme
update_users (line 761)
  • access: public
void update_users ( $handler_vars)
  • $handler_vars

Inherited Methods

Inherited From ActionHandler

ActionHandler::act()
ActionHandler::act_redirect()
ActionHandler::__call()

Documentation generated on Thu, 30 Oct 2008 20:31:01 +0100 by phpDocumentor 1.3.2