Chyrp

Admin Controller

The logic behind the Admin area.

Summary
Admin Controller The logic behind the Admin area.
Variables
$displayed Has anything been displayed?
$context Contains the context for various admin pages, to be passed to the Twig templates.
$selected_bookmarklet Holds the name of the Feather to be selected when they open the bookmarklet.
$base The base path for this controller.
Functions
__construct Prepares Twig.
parse Determines the action.
write Post writing.
bookmarklet Post writing, from the bookmarklet.
add_post Adds a post when the form is submitted.
edit_post Post editing.
update_post Updates a post when the form is submitted.
delete_post Post deletion (confirm page).
destroy_post Destroys a post (the real deal).
manage_posts Post managing.
write_page Page creation.
add_page Adds a page when the form is submitted.
edit_page Page editing.
update_page Updates a page when the form is submitted.
reorder_pages Reorders pages.
delete_page Page deletion (confirm page).
destroy_page Destroys a page.
manage_pages Page managing.
new_user User creation.
add_user Add a user when the form is submitted.
edit_user User editing.
update_user Updates a user when the form is submitted.
delete_user User deletion.
destroy_user Destroys a user.
manage_users User managing.
new_group Group creation.
add_group Adds a group when the form is submitted.
edit_group Group editing.
update_group Updates a group when the form is submitted.
delete_group Group deletion (confirm page).
destroy_group Destroys a group.
manage_groups Group managing.
export Export posts, pages, etc.
import Importing content from other systems.
import_chyrp Chyrp importing.
import_wordpress WordPress importing.
import_tumblr Tumblr importing.
import_textpattern TextPattern importing.
import_movabletype MovableType importing.
modules Module enabling/disabling.
feathers Feather enabling/disabling.
themes Theme switching/previewing.
enable Enables a module or feather.
disable Disables a module or feather.
change_theme Changes the theme.
preview_theme Previews the theme.
general_settings General Settings page.
user_settings User Settings page.
content_settings Content Settings page.
route_settings Route Settings page.
help Sets the $title and $body for various help IDs.
subnav_context Generates the context variables for the subnav.
display Renders the page.
current Returns a singleton reference to the current class.

Variables

$displayed

public $displayed

Has anything been displayed?

$context

public $context

Contains the context for various admin pages, to be passed to the Twig templates.

$selected_bookmarklet

public $selected_bookmarklet

Holds the name of the Feather to be selected when they open the bookmarklet.

$base

public $base

The base path for this controller.

Functions

__construct

private function __construct()

Prepares Twig.

parse

public function parse( $route )

Determines the action.

write

public function write_post()

Post writing.

bookmarklet

public function bookmarklet()

Post writing, from the bookmarklet.

add_post

public function add_post()

Adds a post when the form is submitted.

edit_post

public function edit_post()

Post editing.

update_post

public function update_post()

Updates a post when the form is submitted.

delete_post

public function delete_post()

Post deletion (confirm page).

destroy_post

public function destroy_post()

Destroys a post (the real deal).

manage_posts

public function manage_posts()

Post managing.

write_page

public function write_page()

Page creation.

add_page

public function add_page()

Adds a page when the form is submitted.

edit_page

public function edit_page()

Page editing.

update_page

public function update_page()

Updates a page when the form is submitted.

reorder_pages

public function reorder_pages()

Reorders pages.

delete_page

public function delete_page()

Page deletion (confirm page).

destroy_page

public function destroy_page()

Destroys a page.

manage_pages

public function manage_pages()

Page managing.

new_user

public function new_user()

User creation.

add_user

public function add_user()

Add a user when the form is submitted.

edit_user

public function edit_user()

User editing.

update_user

public function update_user()

Updates a user when the form is submitted.

delete_user

public function delete_user()

User deletion.

destroy_user

public function destroy_user()

Destroys a user.

manage_users

public function manage_users()

User managing.

new_group

public function new_group()

Group creation.

add_group

public function add_group()

Adds a group when the form is submitted.

edit_group

public function edit_group()

Group editing.

update_group

public function update_group()

Updates a group when the form is submitted.

delete_group

public function delete_group()

Group deletion (confirm page).

destroy_group

public function destroy_group()

Destroys a group.

manage_groups

public function manage_groups()

Group managing.

export

public function export()

Export posts, pages, etc.

import

public function import()

Importing content from other systems.

import_chyrp

public function import_chyrp()

Chyrp importing.

import_wordpress

public function import_wordpress()

WordPress importing.

import_tumblr

public function import_tumblr()

Tumblr importing.

import_textpattern

public function import_textpattern()

TextPattern importing.

import_movabletype

public function import_movabletype()

MovableType importing.

modules

public function modules()

Module enabling/disabling.

feathers

public function feathers()

Feather enabling/disabling.

themes

public function themes()

Theme switching/previewing.

enable

public function enable()

Enables a module or feather.

disable

public function disable()

Disables a module or feather.

change_theme

public function change_theme()

Changes the theme.

preview_theme

public function preview_theme()

Previews the theme.

general_settings

public function general_settings()

General Settings page.

user_settings

public function user_settings()

User Settings page.

content_settings

public function content_settings()

Content Settings page.

route_settings

public function route_settings()

Route Settings page.

help

public function help()

Sets the $title and $body for various help IDs.

subnav_context

public function subnav_context( $action )

Generates the context variables for the subnav.

display

public function display( $action,   
$context  =  array(),
$title  =  "" )

Renders the page.

Parameters

$action The template file to display, in /admin/layout/pages.
$context Context for the template.
$title The title for the page.  Defaults to a camlelization of the action, e.g. foo_bar -> Foo Bar.

current

public static function & current()

Returns a singleton reference to the current class.