本文整理匯總了PHP中TabController::is_system_tabs_in_db方法的典型用法代碼示例。如果您正苦於以下問題:PHP TabController::is_system_tabs_in_db方法的具體用法?PHP TabController::is_system_tabs_in_db怎麽用?PHP TabController::is_system_tabs_in_db使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TabController
的用法示例。
在下文中一共展示了TabController::is_system_tabs_in_db方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: UpdateSystemTabs
function UpdateSystemTabs($action, $installed_modules)
{
require_once "modules/MySettings/TabController.php";
$controller = new TabController();
$isSystemTabsInDB = $controller->is_system_tabs_in_db();
if ($isSystemTabsInDB && !empty($installed_modules)) {
global $moduleList;
switch ($action) {
case 'Restore':
$currentTabs = $controller->get_system_tabs();
foreach ($installed_modules as $module) {
if (in_array($module, $currentTabs)) {
unset($currentTabs[$module]);
}
}
$controller->set_system_tabs($currentTabs);
break;
case 'Add':
$currentTabs = $controller->get_system_tabs();
foreach ($installed_modules as $module) {
if (!in_array($module, $currentTabs)) {
$currentTabs[$module] = $module;
}
}
$controller->set_system_tabs($currentTabs);
default:
break;
}
}
}
示例2: updateSystemTabs
/**
* Updates systems tabs
*
* @param string $action The action to take
* @param array $installed_modules The list of modules to add for this action
*/
protected function updateSystemTabs($action, $installed_modules)
{
global $moduleList;
$controller = new TabController();
$isSystemTabsInDB = $controller->is_system_tabs_in_db();
if ($isSystemTabsInDB && !empty($installed_modules)) {
switch ($action) {
case 'Restore':
$currentTabs = $controller->get_system_tabs();
foreach ($installed_modules as $module) {
if (in_array($module, $currentTabs)) {
unset($currentTabs[$module]);
}
}
$controller->set_system_tabs($currentTabs);
break;
case 'Add':
$currentTabs = $controller->get_system_tabs();
foreach ($installed_modules as $module) {
if (!in_array($module, $currentTabs)) {
$currentTabs[$module] = $module;
}
}
$controller->set_system_tabs($currentTabs);
break;
}
if (isset($_SESSION['get_workflow_admin_modules_for_user'])) {
return $_SESSION['get_workflow_admin_modules_for_user'];
}
}
}