Admin Page Framework Documentation

Packages

  • AdminPageFramework
    • Common
      • Factory
      • Form
        • FieldType
      • Utility
    • Factory
      • AdminPage
      • MetaBox
      • NetworkAdmin
      • PageMetaBox
      • PostType
      • TaxonomyField
      • TermMeta
      • UserMeta
      • Widget
    • Utility

Classes

  • AdminPageFramework
  • AdminPageFramework_Controller
  • AdminPageFramework_Controller_Form
  • AdminPageFramework_Controller_Menu
  • AdminPageFramework_Controller_Page
  • AdminPageFramework_View

Resources

  • Tutorials
  • Support
  • Reporting Issues

Class AdminPageFramework

The main class of the framework to be extended to create admin pages and forms.

The user defines their own class by extending this class with the setUp() method overridden to define admin pages.

Abstract
Package: AdminPageFramework\Factory\AdminPage
Since: 2.0.0
Extends: AdminPageFramework_Controller
Remark: Most of the internal methods are prefixed with the underscore like _getSomething() and callback methods are prefixed with _reply. The methods for the users are public and do not have those prefixes.
Located at factory/admin_page/AdminPageFramework.php

Methods summary

public
# __construct( array|integer|string $isOptionKey = null, string $sCallerPath = null, string $sCapability = 'manage_options', string $sTextDomain = 'admin-page-framework' )

Registers necessary callbacks and sets up internal components including properties.

Example

new MyAdminPageClass( 'my_custom_option_key', __FILE__ );

Parameters

$isOptionKey
array|integer|string
$aisOptionKey (optional) specifies the option key name to store in the options table. If this is not set, the instantiated class name will be used as default. [3.5.9+] If an integer is given, a transient will be used. If an array of option key arguments is given, the argument values will be set to the framework properties. - type - either options_table or transient. - key - the option key or the transient key - duration - when the option type is transient, this value will be used for the time span to store the value in the database. ` array( 'type' => 'options_table', 'key' => 'my_admin_options', ) ` ` array( 'type' => 'transient', 'key' => $sTransientKeyDefinedSomewhereInYourProgram, 'duration' => 60*60*24*2 // two days ) `
$sCallerPath
string
$sCallerPath (optional) used to retrieve the plugin/theme details to auto-insert the information into the page footer.
$sCapability
string
$sCapability (optional) sets the overall access level to the admin pages created by the framework. The used capabilities are listed here. The capability can be set per page, tab, setting section, setting field. Default: manage_options
$sTextDomain
string
$sTextDomain (optional) the text domain used for the framework's system messages. Default: admin-page-framework.

Since

2.0.0

See

http://codex.wordpress.org/Roles_and_Capabilities
http://codex.wordpress.org/I18n_for_WordPress_Developers#Text_Domains

Magic methods summary

Properties summary

Related

Direct known subclasses

AdminPageFramework_NetworkAdmin

If you find undocumented functionality, please report it here.

Admin Page Framework