AdminThemeFramework class

AdminTheme Framework

The methods in this class may eventually be merged to AdminTheme.php, but are isolated to this class during development.

This file is licensed under the MIT license.


Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the AdminThemeFramework class also inherits all the methods and properties of: AdminTheme, WireData and Wire.

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
AdminThemeFramework::allowPageInNav(Page $p)
bool

Allow the given Page to appear in admin theme navigation?

 
AdminThemeFramework::get(string $key)
bool int mixed null string

Override get() method from WireData to support additional properties

 
AdminThemeFramework::getAddNewActions()
array

Get “Add New” button actions

 
AdminThemeFramework::getAddNewLabel()
string

Get the translated “Add New” label that’s used in a couple spots

 
AdminThemeFramework::getBodyClass()
string

Get the classes that will be used in the <body class=''> tag

 
AdminThemeFramework::getBrowserTitle()
string

Get the browser <title>

 
AdminThemeFramework::getHeadJS()
string

Get Javascript that must be present in the document <head>

 
AdminThemeFramework::getHeadline()
string

Get the current page headline

 
AdminThemeFramework::getModuleConfigInputfields(InputfieldWrapper $inputfields)
None

Module Configuration

 
AdminThemeFramework::getPageIcon(Page $p)
mixed null string

Get icon used by the given page

 
AdminThemeFramework::getPageTitle(Page $p)
string

Get navigation title for the given page, return blank if page should not be shown

 
AdminThemeFramework::getPrimaryNavArray()
array

Return nav array of primary navigation

AdminThemeFramework::getUserNavArray()
array

Get navigation items for the “user” menu

AdminThemeFramework::includeFile(string $basename)
None

Include an admin theme file

 
AdminThemeFramework::includeInitFile()
None

Include the admin theme init file

 
AdminThemeFramework::init()
None

Initialize and attach hooks

 
AdminThemeFramework::moduleToNavArray($module, Page $p)
array

Get navigation array from a Process module

 
AdminThemeFramework::pageToNavArray(Page $p)
array null

Get a navigation array the given Page, or null if page not allowed in nav

 
AdminThemeFramework::renderExtraMarkup(string $for)
mixed string

Render an extra markup region

 
AdminThemeFramework::renderIcon(string $icon)
string

Render markup for a font-awesome icon

 
AdminThemeFramework::renderNavIcon(string $icon)
string

Render markup for a font-awesome icon that precedes a navigation label

 
AdminThemeFramework::renderNotices($notices)
string array

Render runtime notices div#notices

 
AdminThemeFramework::setCustomTemplatePath(string $path)
None

Set custom path for admin theme templates

 
AdminThemeFramework::testNotices()
bool

Test all notice types

 
AdminThemeFramework::wired()
None 

For hooks

These methods are only useful for hooking and should not be called directly.

Properties

NameReturnSummary 
AdminThemeFramework::browserTitle string Optional custom browser title for this request 3.0.217+ 
AdminThemeFramework::isEditor bool 
AdminThemeFramework::isLoggedIn bool 
AdminThemeFramework::isModal bool string 
AdminThemeFramework::isSuperuser bool 
AdminThemeFramework::useAsLogin bool int 

Additional methods and properties

In addition to the methods and properties above, AdminThemeFramework also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.252