Class AdminPageFramework_Menu_Controller
Provides methods to manipulate menu items.
- AdminPageFramework_Factory_Router
-
AdminPageFramework_Factory_Model
-
AdminPageFramework_Factory_View
-
AdminPageFramework_Factory_Controller
-
AdminPageFramework_Factory
-
AdminPageFramework_Router
-
AdminPageFramework_Form_Model_Port
-
AdminPageFramework_Form_Model_Validation
-
AdminPageFramework_Form_Model
-
AdminPageFramework_Form_View
-
AdminPageFramework_Form_Controller
-
AdminPageFramework_Page_Model
-
AdminPageFramework_Page_View_MetaBox
-
AdminPageFramework_Page_View
-
AdminPageFramework_Page_Controller
-
AdminPageFramework_Menu_Model
-
AdminPageFramework_Menu_View
-
AdminPageFramework_Menu_Controller
Indirect known subclasses
Package: AdminPageFramework\AdminPage
Since: 2.0.0
Since: 3.3.1 Changed the name from
AdminPageFramework_Menu
.Extends: AdminPageFramework_Menu_View
Located at factory/AdminPageFramework/AdminPageFramework_Menu_Controller.php
Methods summary
public
|
#
setRootMenuPage( string $sRootMenuLabel, string $sIcon16x16 = null, string $iMenuPosition = null )
Sets to which top level page is going to be adding sub-pages. Example$this->setRootMenuPage( 'Settings' ); $this->setRootMenuPage( 'APF Form', plugins_url( 'image/screen_icon32x32.jpg', __FILE__ ) ); Parameters
Since
2.0.0
2.1.6 The $sIcon16x16 parameter accepts a file path. 3.0.0 The scope was changed to public from protected. Acecss
public
Remark
Only one root page can be set per one class instance.
|
public
|
#
setRootMenuPageBySlug( string $sRootMenuSlug )
Sets the top level menu page by page slug. The page should be already created or scheduled to be created separately. Example$this->setRootMenuPageBySlug( 'edit.php?post_type=apf_posts' ); Parameters
Since
2.0.0
3.0.0 The scope was changed to public from protected. |
public
|
#
addSubMenuItems( array $aSubMenuItem1, array $aSubMenuItem2 = null, array $_and_more = null )
Adds sub-menu items on the left sidebar menu of the administration panel. It supports pages and links. Each of them has the specific array structure. Example$this->addSubMenuItems( array( 'title' => 'Various Form Fields', 'page_slug' => 'first_page', 'screen_icon' => 'options-general', ), array( 'title' => 'Manage Options', 'page_slug' => 'second_page', 'screen_icon' => 'link-manager', ), array( 'title' => 'Google', 'href' => 'http://www.google.com', 'show_page_heading_tab' => false, // this removes the title from the page heading tabs. ) ); Parameters
Since
2.0.0
3.0.0 Changed the scope to public. Remark
The sub menu page slug should be unique because add_submenu_page() can add one
callback per page slug.
Accepts variadic parameters; the number of accepted parameters are not limited to three. |
public
|
#
addSubMenuItem( array $aSubMenuItem )
Adds the given sub-menu item on the left sidebar menu of the administration panel. It supports pages and links. Each of them has the specific array structure. Example$this->addSubMenuItem( array( 'title' => 'Read Me', 'menu_title' => 'About' 'page_slug' => 'my_plugin_readme', ) ); Parameters
Since
2.0.0
3.0.0 Changed the scope to public. Remark
The sub menu page slug should be unique because add_submenu_page() can add one
callback per page slug.
|
Methods inherited from AdminPageFramework_Page_Controller
addInPageTab()
,
addInPageTabs()
,
setInPageTabTag()
,
setInPageTabsVisibility()
,
setPageHeadingTabTag()
,
setPageHeadingTabsVisibility()
,
setPageTitleVisibility()
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()
,
_replyToRemoveConfirmationQueryKey()
,
_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