Settings menu class
access | public |
---|---|
package | kocuj_internal_lib |
inherited_from | \KocujIL\V12a\Classes\ComponentObject |
__call(string $name, array $arguments) : array | boolean | float | integer | string | void
access | public |
---|
string
Method name
array
boolean
float
integer
string
void
Value returned by called method__construct(object $projectObj) : void
access | public |
---|
object
\KocujIL\V12a\Classes\Project object for current project
actionAdminMenu() : void
access | public |
---|
addSettingsMenu(string $title, string $capability, string $id, array|string $function, string $parentId= ''
, integer $type= \KocujIL\V12a\Enums\Project\Components\Backend\SettingsMenu\Type::SITE
, array $attr= array()
) : void
access | public |
---|
string
Menu title
string
Capability required for access to this menu
string
Menu id
array
string
Callback function or method name; can be global function or method from any class
string
Parent menu identifier - default: empty
integer
Menu type - site or network; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsMenu\Type: SITE or NETWORK - default: \KocujIL\V12a\Enums\Project\Components\Backend\SettingsMenu\Type::SITE
array
Additional attributes; there are available the following attributes: "firstoptiontitle" (title for first option if current option menu is without parent; only for menu - not submenu), "fulltitle" (string type; full title of page), "icon" (string type; icon name for settings option; only for menu - not submenu), "onpluginslist" (bool type; there will be link to this settings on this plugin information in plugins list with title from this option or from "pluginslisttitle" attribute if exists), "pluginslisttitle" (string type; title of plugin if "onpluginslist" is set to true) - default: empty
addSettingsMenuBuiltIn(string $title, string $capability, string $id, array|string $function, integer $parentType= \KocujIL\V12a\Enums\Project\Components\Backend\SettingsMenu\ParentType::DASHBOARD
, array $attr= array()
) : void
access | public |
---|
string
Menu title
string
Capability required for access to this menu
string
Menu id
array
string
Callback function or method name; can be global function or method from any class
integer
Parent menu type; must be one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsMenu\ParentType: DASHBOARD, POSTS, MEDIA, LINKS, PAGES, COMMENTS, THEMES, PLUGINS, USERS, TOOLS, NETWORK_DASHBOARD, NETWORK_SITES, NETWORK_USERS, NETWORK_THEMES, NETWORK_PLUGINS or NETWORK_OPTIONS - default: \KocujIL\V12a\Enums\Project\Components\Backend\SettingsMenu\ParentType::DASHBOARD
array
Additional attributes; there are available the following attributes: "firstoptiontitle" (title for first option if current option menu is without parent; only for menu - not submenu), "fulltitle" (string type; full title of page), "icon" (string type; icon name for settings option; only for menu - not submenu), "onpluginslist" (bool type; there will be link to this settings on this plugin information in plugins list with title from this option or from "pluginslisttitle" attribute if exists), "pluginslisttitle" (string type; title of plugin if "onpluginslist" is set to true) - default: empty
checkCurrentPageIsSettingsForProject() : boolean
access | public |
---|
boolean
Current page is for settings for current project (true) or not (false)checkSettingsMenu(string $id) : boolean
access | public |
---|
string
Settings menu identifier
boolean
Settings menu exists (true) or not (false)filterPluginActionLinks(string $links, string $filename) : string
access | public |
---|
string
Actions links list
string
Plugin filename
string
Actions links listgetComponent(string $type, integer $projectCategory= \KocujIL\V12a\Enums\ProjectCategory::CORE
, string $fragment= ''
) : object
access | public |
---|
string
Component type
integer
Component category; must be one of the following constants from \KocujIL\V12a\Enums\ProjectCategory: CORE (for "core" category), ALL (for "all" category), FRONTEND (for "frontend" category) or BACKEND (for "backend" category) - default: \KocujIL\V12a\Enums\ProjectCategory::CORE
string
Component fragment - default: empty
object
Object of class type from componentgetCurrentSettingsMenu() : boolean | string
access | public |
---|
boolean
string
Current settings menu page or false if it is not page for current projectgetProjectObj() : object
access | public |
---|
object
Object of type \KocujIL\V12a\Classes\ProjectgetSettingsMenu(string $id) : array | boolean
access | public |
---|
string
Settings menu identifier
array
boolean
Selected setting menu data or false if not exists; each settings menu data has the following fields: "alternativepagescreenname" (string type; alternative screen name for this page), "capability" (string type; capability required for access to this menu), "firstoptiontitle" (string type; title for first option if current option menu is without parent; only for menu - not submenu), "function" (array or string type; callback function or method name), "icon" (string type; icon name for settings option; only for menu - not submenu), "menutype" (int type; it is one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsMenu\Type: SITE or NETWORK), "onpluginslist" (bool type; there will be link to this settings on this plugin information in plugins list with title from this option or from "pluginslisttitle" attribute if exists), "pagescreenname" (string type; screen name for this page), "pluginslisttitle" (string type; title of plugin if "onpluginslist" is set to true), "title" (string type; menu title)getSettingsMenuHookSuffix(string $id) : boolean | string
access | public |
---|
string
Settings menu identifier
boolean
string
Hook suffix for the selected settings menu or false if not existsgetSettingsMenus() : array
access | public |
---|
array
Settings menus data; each settings menu data has the following fields: "alternativepagescreenname" (string type; alternative screen name for this page), "capability" (string type; capability required for access to this menu), "firstoptiontitle" (string type; title for first option if current option menu is without parent; only for menu - not submenu), "function" (array or string type; callback function or method name), "icon" (string type; icon name for settings option; only for menu - not submenu), "menutype" (int type; it is one of the following constants from \KocujIL\V12a\Enums\Project\Components\Backend\SettingsMenu\Type: SITE or NETWORK), "onpluginslist" (bool type; there will be link to this settings on this plugin information in plugins list with title from this option or from "pluginslisttitle" attribute if exists), "pagescreenname" (string type; screen name for this page), "pluginslisttitle" (string type; title of plugin if "onpluginslist" is set to true), "title" (string type; menu title)getStrings(string $type, integer $projectCategory = \KocujIL\V12a\Enums\ProjectCategory::CORE
) : object
access | public |
---|
string
Component type
integer
Component category; must be one of the following constants from \KocujIL\V12a\Enums\ProjectCategory: CORE (for "core" category), ALL (for "all" category), FRONTEND (for "frontend" category) or BACKEND (for "backend" category) - default: \KocujIL\V12a\Enums\ProjectCategory::CORE
object
Object of class type for strings from componentremoveSettingsMenu(string $id) : void
access | public |
---|
string
Settings menu identifier
showTitleButton(string $id, string $link, string $text) : void
access | private |
---|
string
Button identifier
string
Button link
string
Button text
$alternativePageScreenNames : array
array()
access | private |
---|
$pageScreenNames : array
array()
access | private |
---|
$projectObj : object
NULL
access | private |
---|
$settingsMenu : array
array()
access | private |
---|
$settingsMenuHookSuffix : array
array()
access | private |
---|