Admin Page Framework Documentation
  • Package
  • Class
  • Tree

Packages

  • AdminPageFramework
    • AdminPage
    • Factory
    • FieldType
    • MetaBox
    • NetworkAdmin
    • PageMetaBox
    • PostType
    • TaxonomyField
    • Widget

Classes

  • AdminPageFramework
  • AdminPageFramework_Form_Controller
  • AdminPageFramework_Menu_Controller
  • AdminPageFramework_Menu_Model
  • AdminPageFramework_Menu_View
  • AdminPageFramework_Page_Controller
  • AdminPageFramework_Page_Model
  • AdminPageFramework_Page_View

Class AdminPageFramework_Page_Controller

Provides methods to manipulate how admin pages are displayed.

AdminPageFramework_Factory_Router
Extended by AdminPageFramework_Factory_Model
Extended by AdminPageFramework_Factory_View
Extended by AdminPageFramework_Factory_Controller
Extended by AdminPageFramework_Factory
Extended by AdminPageFramework_Router
Extended by AdminPageFramework_Form_Model_Port
Extended by AdminPageFramework_Form_Model_Validation
Extended by AdminPageFramework_Form_Model
Extended by AdminPageFramework_Form_View
Extended by AdminPageFramework_Form_Controller
Extended by AdminPageFramework_Page_Model
Extended by AdminPageFramework_Page_View_MetaBox
Extended by AdminPageFramework_Page_View
Extended by AdminPageFramework_Page_Controller

Direct known subclasses

AdminPageFramework_Menu_Model

Indirect known subclasses

AdminPageFramework, AdminPageFramework_Menu_Controller, AdminPageFramework_Menu_View, AdminPageFramework_NetworkAdmin

Abstract
Package: AdminPageFramework\AdminPage
Since: 3.3.1
Extends: AdminPageFramework_Page_View
Located at factory/AdminPageFramework/AdminPageFramework_Page_Controller.php

Methods summary

public
# addInPageTabs( array $aTab1, array $aTab2 = null, array $_and_more = null )

Adds in-page tabs.

The parameters accept in-page tab arrays and they must have the following array keys.

Example

$this->addInPageTabs(
     array(
         'page_slug' => 'myfirstpage'
         'tab_slug'  => 'firsttab',
         'title'     => __( 'Text Fields', 'my-text-domain' ),
     ),
     array(
         'page_slug' => 'myfirstpage'
         'tab_slug'  => 'secondtab',
         'title'     => __( 'Selectors and Checkboxes', 'my-text-domain' ),
     )
);
$this->addInPageTabs(
     'myfirstpage', // sets the target page slug
     array(
         'tab_slug'  => 'firsttab',
         'title'     => __( 'Text Fields', 'my-text-domain' ),
     ),
     array(
         'tab_slug'  => 'secondtab',
         'title'     => __( 'Selectors and Checkboxes', 'my-text-domain' ),
     )
);

Parameters

$aTab1
array
$aTab1 The in-page tab array.

In-Page Tab Array

  • page_slug - (string) the page slug that the tab belongs to.
  • tab_slug - (string) the tab slug. Non-alphabetical characters should not be used including dots(.) and hyphens(-).
  • title - (string) the title of the tab.
  • order - (optional, integer) the order number of the tab. The lager the number is, the lower the position it is placed in the menu.
  • show_in_page_tab - (optional, boolean) default: false. If this is set to false, the tab title will not be displayed in the tab navigation menu; however, it is still accessible from the direct URL.
  • parent_tab_slug - (optional, string) this needs to be set if the above show_in_page_tab is true so that the parent tab will be emphasized as active when the hidden page is accessed.
$aTab2
array
$aTab2 Another in-page tab array.
$_and_more
array
$_and_more (optional) Add in-page tab arrays as many as necessary to the next parameters.

Since

2.0.0
3.0.0 Changed the scope to public. Added page slug target support.
3.3.1 Moved from AdminPageFramework_Page.

Remark

Accepts variadic parameters; the number of accepted parameters are not limited to three.
In-page tabs are different from page-heading tabs which is automatically added with page titles.
public
# addInPageTab( array|string $asInPageTab )

Adds an in-page tab.

The singular form of the addInPageTabs() method, which takes only one parameter.

Parameters

$asInPageTab
array|string
$asInPageTab The in-page tab array or the target page slug. If the target page slug is set, the page_slug key can be omitted from next calls.

Since

2.0.0
3.0.0 Changed the scope to public.
3.3.1 Moved from AdminPageFramework_Page.

Remark

Use this method to add in-page tabs to ensure the array holds all the necessary keys.
In-page tabs are different from page-heading tabs which are automatically added with page titles.
public
# setPageTitleVisibility( boolean $bShow = true, mixed $sPageSlug = '' )

Sets whether the page title is displayed or not.

Example

$this->setPageTitleVisibility( false );    // disables the page title.

Parameters

$bShow
boolean
$bShow If false, the page title will not be displayed.
$sPageSlug

Since

2.0.0
3.0.0 Changed the scope to public.
3.3.1 Moved from AdminPageFramework_Page.
public
# setPageHeadingTabsVisibility( boolean $bShow = true, string $sPageSlug = '' )

Sets whether page-heading tabs are displayed or not.

Example

$this->setPageHeadingTabsVisibility( false );    // disables the page heading tabs by passing false.

Parameters

$bShow
boolean
$bShow If false, page-heading tabs will be disabled; otherwise, enabled.
$sPageSlug
string
$sPageSlug The page to apply the visibility setting. If not set, it applies to all the pages.

Since

2.0.0
3.0.0 Changed the scope to public.
3.3.1 Moved from AdminPageFramework_Page.

Remark

Page-heading tabs and in-page tabs are different. The former displays page titles and the latter displays tab titles.
If the second parameter is omitted, it sets the default value.
public
# setInPageTabsVisibility( boolean $bShow = true, string $sPageSlug = '' )

Sets whether in-page tabs are displayed or not.

Sometimes, it is required to disable in-page tabs in certain pages. In that case, use the second parameter.

Parameters

$bShow
boolean
$bShow If false, in-page tabs will be disabled.
$sPageSlug
string
$sPageSlug The page to apply the visibility setting. If not set, it applies to all the pages.

Since

2.1.1
3.0.0 Changed the scope to public. Changed the name from showInPageTabs() to setInPageTabsVisibility().
3.3.1 Moved from AdminPageFramework_Page.

Remark

If the second parameter is omitted, it sets the default value.
public
# setInPageTabTag( string $sTag = 'h3', string $sPageSlug = '' )

Sets in-page tab's HTML tag.

Example

$this->setInPageTabTag( 'h2' );

Parameters

$sTag
string
$sTag The HTML tag that encloses each in-page tab title. Default: h3.
$sPageSlug
string
$sPageSlug The page slug that applies the setting.

Since

2.0.0
3.0.0 Changed the scope to public.
3.3.1 Moved from AdminPageFramework_Page.

Remark

If the second parameter is omitted, it sets the default value.
public
# setPageHeadingTabTag( string $sTag = 'h2', string $sPageSlug = '' )

Sets page-heading tab's HTML tag.

Example

$this->setPageHeadingTabTag( 'h2' );

Parameters

$sTag
string
$sTag The HTML tag that encloses the page-heading tab title. Default: h2.
$sPageSlug
string
$sPageSlug The page slug that applies the setting.

Since

2.1.2
3.0.0 Changed the scope to public.
3.3.1 Moved from AdminPageFramework_Page.

Remark

If the second parameter is omitted, it sets the default value.

Methods inherited from AdminPageFramework_Page_View_MetaBox

__construct(), _getNumberOfColumns(), _printMetaBox(), _replyToAddMetaboxScript(), _replyToEnableMetaBox(), _replyToReturnDefaultNumberOfScreenColumns(), _replyToSetNumberOfScreenLayoutColumns()

Methods inherited from AdminPageFramework_Form_Controller

addSettingField(), addSettingFields(), addSettingSection(), addSettingSections(), getValue(), removeSettingFields(), removeSettingSections()

Methods inherited from AdminPageFramework_Form_View

_replyToGetFieldOutput(), _replyToGetSectionHeaderOutput()

Methods inherited from AdminPageFramework_Form_Model

_replyToCheckRedirects(), _replyToRegisterSettings(), _replyToSendFormEmail(), getSavedOptions()

Methods inherited from AdminPageFramework_Form_Model_Validation

_handleSubmittedData(), _validateSubmittedData()

Methods inherited from AdminPageFramework_Form_Model_Port

_exportOptions(), _importOptions()

Methods inherited from AdminPageFramework_Router

__call(), _doPageLoadCall(), _isInThePage(), _isInstantiatable(), _sortByOrder()

Methods inherited from AdminPageFramework_Factory_Controller

addHelpText(), hasFieldError(), hasSettingNotice(), setFieldErrors(), setSettingNotice(), setUp()

Methods inherited from AdminPageFramework_Factory_View

_replyToPrintSettingNotice()

Methods inherited from AdminPageFramework_Factory_Model

_getFieldErrors(), _isValidationErrors(), _loadDefaultFieldTypeDefinitions(), _registerFields(), _replyToDeleteFieldErrors(), _replyToSaveFieldErrors(), _replyToSaveNotices(), _setLastInput(), _setUp(), getFieldErrors(), validate()

Methods inherited from AdminPageFramework_Factory_Router

__get(), __toString(), _getFormInstance(), _getHelpPaneInstance(), _getLinkInstancce(), _getPageLoadInfoInstance(), _getResourceInstance(), _replyToLoadComponents()

Magic methods summary

Properties summary

Properties inherited from AdminPageFramework_Form_Model

$_bDoneEmail, $_sFieldsType, $_sTargetPageSlug, $_sTargetSectionTabSlug, $_sTargetTabSlug, $aFieldErrors

Properties inherited from AdminPageFramework_Router

$_aHookPrefixes

Properties inherited from AdminPageFramework_Factory_Router

$oProp

Admin Page Framework Documentation generated by ApiGen 2.8.0