Admin Page Framework Documentation

Packages

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

Classes

  • AdminPageFramework_NetworkAdmin

Resources

  • Tutorials
  • Support
  • Reporting Issues

Class AdminPageFramework_NetworkAdmin

The factory class to be extended to creates network admin pages.

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

Abstract
Package: AdminPageFramework\Factory\NetworkAdmin
Since: 3.1.0
Extends: AdminPageFramework
Remark: This class stems from several abstract classes.
Located at factory/network_admin_page/AdminPageFramework_NetworkAdmin.php

Methods summary

public
# __construct( string $sOptionKey = null, string $sCallerPath = null, string $sCapability = 'manage_network', string $sTextDomain = 'admin-page-framework' )

Registers necessary callbacks ans sets up internal components including properties.

Example

new MyNetworkAdminPageClass( 'my_custom_option_key', __FILE__ );

Parameters

$sOptionKey
string
$sOptionKey (optional) specifies the option key name to store in the options table. If this is not set, the instantiated class name will be used.
$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.

Returns


returns nothing.

Since

3.1.0

See

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

Overrides

AdminPageFramework::__construct
public static mixed
# getOption( string $sOptionKey, string $asKey = null , mixed $vDefault = null )

Retrieves the saved option value from the given option key and the dimensional array key representation.

Example

$aData       = AdminPageFramework::getOption( 'APF' );
$aSection    = AdminPageFramework::getOption( 'APF', 'my_section' );
$sText       = AdminPageFramework::getOption( 'APF', array( 'my_section', 'my_text_field' ), 'foo' );
$sColor      = AdminPageFramework::getOption( 'APF', 'my_color_field', '#FFF' );

Parameters

$sOptionKey
string
$sOptionKey the option key of the options table.
$asKey
string
$asKey the representation of dimensional array keys. If the returning option structure is like the following, array( 'a' => array( 'b' => array( 'c' => 'ccc', ), ), ) then the value 'ccc' can be retrieved with the key representation array of array( 'a', 'b', 'c' )
$vDefault
mixed
$vDefault the default value that will be returned if nothing is stored.

Returns

mixed
If the field ID is not specified.

Since

3.1.0

Overrides

AdminPageFramework_Controller::getOption

Magic methods summary

Properties summary

Related

If you find undocumented functionality, please report it here.

Admin Page Framework