PHP Класс Habari\AdminHandler

Наследование: extends ActionHandler
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$active_theme An instance of the active public theme, which allows plugin hooks to execute

Открытые методы

Метод Описание
__construct ( ) Verifies user credentials before creating the theme and displaying the request.
__static ( ) Register plugin hooks
act ( $action ) Dispatches the request to the defined method. (ie: post_{page})
act_admin_ajax ( ) Handle incoming requests to /admin_ajax for admin ajax requests
ajax_facets ( $handler_vars ) Handle ajax requests for facets on admin pages
create_theme ( ) Create the active theme instance
get_blank ( string $content = '' ) Display a blank admin page with appropriate navigation.
get_sysinfo ( ) Handles get requests for the system information page.
setup_admin_theme ( string $page, string $type = '' ) Create the admin theme instance

Защищенные методы

Метод Описание
display ( $template_name ) Helper function to assign all handler_vars into the theme and displays a theme template.
filter_menus_by_permission ( array $menuarray ) : array Remove menus for which the user does not have qualifying permissions.
get_main_menu ( Theme $theme ) Assembles the main menu for the admin area.
set_admin_template_vars ( $theme ) Assigns the main menu to $mainmenu into the theme.

Приватные методы

Метод Описание
access_allowed ( $page, $type ) Checks if the currently logged in user has access to a page and post type.

Описание методов

__construct() публичный Метод

Verifies user credentials before creating the theme and displaying the request.
public __construct ( )

__static() публичный статический Метод

Register plugin hooks
public static __static ( )

act() публичный Метод

Dispatches the request to the defined method. (ie: post_{page})
public act ( $action )

act_admin_ajax() публичный Метод

Handle incoming requests to /admin_ajax for admin ajax requests
public act_admin_ajax ( )

ajax_facets() публичный Метод

Handle ajax requests for facets on admin pages
public ajax_facets ( $handler_vars )
$handler_vars

create_theme() публичный Метод

Create the active theme instance
public create_theme ( )

display() защищенный Метод

Helper function to assign all handler_vars into the theme and displays a theme template.
protected display ( $template_name )

filter_menus_by_permission() защищенный Метод

Remove menus for which the user does not have qualifying permissions.
protected filter_menus_by_permission ( array $menuarray ) : array
$menuarray array The master array of admin menu items
Результат array The modified array of admin menu items

get_blank() публичный Метод

This function terminates execution before returning. Useful for displaying errors when permission is denied for viewing.
public get_blank ( string $content = '' )
$content string Optional default content to display

get_main_menu() защищенный Метод

Assembles the main menu for the admin area.
protected get_main_menu ( Theme $theme )
$theme Theme The theme to add the menu to

get_sysinfo() публичный Метод

Handles get requests for the system information page.
public get_sysinfo ( )

set_admin_template_vars() защищенный Метод

Assigns the main menu to $mainmenu into the theme.
protected set_admin_template_vars ( $theme )

setup_admin_theme() публичный Метод

Create the admin theme instance
public setup_admin_theme ( string $page, string $type = '' )
$page string The admin page requested
$type string The content type included in the request

Описание свойств

$active_theme защищенное свойство

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