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 |
|---|
stringMethod name
arraybooleanfloatintegerstringvoidValue 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 |
|---|
stringMenu title
stringCapability required for access to this menu
stringMenu id
arraystringCallback function or method name; can be global function or method from any class
stringParent menu identifier - default: empty
integerMenu 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
arrayAdditional 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 |
|---|
stringMenu title
stringCapability required for access to this menu
stringMenu id
arraystringCallback function or method name; can be global function or method from any class
integerParent 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
arrayAdditional 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 |
|---|
booleanCurrent page is for settings for current project (true) or not (false)checkSettingsMenu(string $id) : boolean
| access | public |
|---|
stringSettings menu identifier
booleanSettings menu exists (true) or not (false)filterPluginActionLinks(string $links, string $filename) : string
| access | public |
|---|
stringActions links list
stringPlugin filename
stringActions links listgetComponent(string $type, integer $projectCategory= \KocujIL\V12a\Enums\ProjectCategory::CORE, string $fragment= '') : object
| access | public |
|---|
stringComponent type
integerComponent 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
stringComponent fragment - default: empty
objectObject of class type from componentgetCurrentSettingsMenu() : boolean | string
| access | public |
|---|
booleanstringCurrent settings menu page or false if it is not page for current projectgetProjectObj() : object
| access | public |
|---|
objectObject of type \KocujIL\V12a\Classes\ProjectgetSettingsMenu(string $id) : array | boolean
| access | public |
|---|
stringSettings menu identifier
arraybooleanSelected 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 |
|---|
stringSettings menu identifier
booleanstringHook suffix for the selected settings menu or false if not existsgetSettingsMenus() : array
| access | public |
|---|
arraySettings 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 |
|---|
stringComponent type
integerComponent 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
objectObject of class type for strings from componentremoveSettingsMenu(string $id) : void
| access | public |
|---|
stringSettings menu identifier
showTitleButton(string $id, string $link, string $text) : void
| access | private |
|---|
stringButton identifier
stringButton link
stringButton 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 |
|---|