当前位置: 首页>>代码示例>>PHP>>正文


PHP ModuleManager::getDisabledModuleList方法代码示例

本文整理汇总了PHP中ModuleManager::getDisabledModuleList方法的典型用法代码示例。如果您正苦于以下问题:PHP ModuleManager::getDisabledModuleList方法的具体用法?PHP ModuleManager::getDisabledModuleList怎么用?PHP ModuleManager::getDisabledModuleList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ModuleManager的用法示例。


在下文中一共展示了ModuleManager::getDisabledModuleList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ModuleManager

<?php

// Attogram Framework - Module Manager Admin Page v0.2.3
namespace Attogram;

$manager = new ModuleManager($this);
if ($this->request->query->has('e')) {
    $results = $manager->enable($this->request->query->get('e'));
    header('Location: .');
    $this->shutdown();
}
if ($this->request->query->has('d')) {
    $results = $manager->disable($this->request->query->get('d'));
    header('Location: .');
    $this->shutdown();
}
$this->pageHeader('Module Manager');
print '<div class="container">' . '<h1 class="squished">Module Manager</h1>' . '<hr />' . '<h3>Active Modules:</h3>';
foreach ($manager->getEnabledModuleList() as $moduleBaseName => $moduleInfo) {
    print $manager->moduleRow($moduleBaseName, $moduleInfo, true);
}
print '<h3>Disabled Modules:</h3>';
foreach ($manager->getDisabledModuleList() as $moduleBaseName => $moduleInfo) {
    print $manager->moduleRow($moduleBaseName, $moduleInfo, false);
}
print '</div>';
$this->pageFooter();
开发者ID:attogram,项目名称:attogram-modulemanager,代码行数:27,代码来源:module-admin.php

示例2: array

if (!empty($_GET)) {
    $a = array();
    foreach ($_GET as $key => $value) {
        $a[$key] = htmlspecialchars($value);
    }
    $_GET = $a;
}
/* Sanitising $_GET parameters: Ends */
/* Loading disabled modules: Begins */
require_once ROOT_PATH . '/lib/common/ModuleManager.php';
$disabledModules = array();
if (isset($_SESSION['admin.disabledModules'])) {
    $disabledModules = $_SESSION['admin.disabledModules'];
} else {
    $moduleManager = new ModuleManager();
    $disabledModules = $moduleManager->getDisabledModuleList();
    $_SESSION['admin.disabledModules'] = $disabledModules;
}
/* Loading disabled modules: Ends */
define('Admin', 'MOD001');
define('PIM', 'MOD002');
define('MT', 'MOD003');
define('Report', 'MOD004');
define('Leave', 'MOD005');
define('TimeM', 'MOD006');
define('Benefits', 'MOD007');
define('Recruit', 'MOD008');
define('Perform', 'MOD009');
$arrRights = array('add' => false, 'edit' => false, 'delete' => false, 'view' => false);
$arrAllRights = array(Admin => $arrRights, PIM => $arrRights, MT => $arrRights, Report => $arrRights, Leave => $arrRights, TimeM => $arrRights, Benefits => $arrRights, Recruit => $arrRights, Perform => $arrRights);
require_once ROOT_PATH . '/lib/models/maintenance/Rights.php';
开发者ID:rabbitdigital,项目名称:HRM,代码行数:31,代码来源:index.php


注:本文中的ModuleManager::getDisabledModuleList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。