Class AdminPageFramework_Controller_Page
Provides methods to manipulate the way admin pages are displayed.
Package: AdminPageFramework\Factory\AdminPage
Since: 3.3.1
Since: 3.6.3 Changed the name from
AdminPageFramework_Page_Controller
.Extends: AdminPageFramework_View_Page
Located at factory/admin_page/AdminPageFramework_Controller_Page.php
Methods summary
public
|
#
addInPageTabs( )
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' ), ) ); 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 Parameters
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
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
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
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
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
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.
|
Magic methods summary
Properties summary
Related
Indirect known subclasses
AdminPageFramework
,
AdminPageFramework_Controller
,
AdminPageFramework_Controller_Menu
,
AdminPageFramework_NetworkAdmin
,
AdminPageFramework_View