本文整理汇总了PHP中Menu::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Menu::load方法的具体用法?PHP Menu::load怎么用?PHP Menu::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Menu
的用法示例。
在下文中一共展示了Menu::load方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCaseMenu
public function getCaseMenu($params)
{
G::LoadClass("configuration");
G::LoadClass("case");
global $G_TMP_MENU;
global $sStatus;
$sStatus = $params['app_status'];
$oCase = new Cases();
$conf = new Configurations();
$oMenu = new Menu();
$oMenu->load('caseOptions');
$menuOptions = array();
foreach ($oMenu->Options as $i => $action) {
$option = array('id' => $oMenu->Id[$i], 'label' => $oMenu->Labels[$i], 'action' => $action);
switch ($option['id']) {
case 'STEPS':
$option['options'] = array();
break;
case 'ACTIONS':
$option['options'] = $this->getActionOptions();
break;
case 'INFO':
$option['options'] = $this->getInformationOptions();
break;
}
$menuOptions[] = $option;
}
echo G::json_encode($menuOptions);
}
示例2: Menu
*/
$RBAC->requirePermissions("PM_SETUP", "PM_USERS");
///////
$adminSelected = null;
if (isset($_REQUEST["s"])) {
$adminSelected = $_REQUEST["s"];
} else {
if (isset($_SESSION["ADMIN_SELECTED"])) {
$adminSelected = $_SESSION["ADMIN_SELECTED"];
}
}
///////
$oHeadPublisher =& headPublisher::getSingleton();
global $G_TMP_MENU;
$oMenu = new Menu();
$oMenu->load("setup");
$items = array();
$menuTypes = array_unique($oMenu->Types);
foreach ($menuTypes as $i => $v) {
if ($v == "admToolsContent") {
unset($menuTypes[$i]);
break;
}
}
//sort($menuTypes);
$tabItems = array();
$i = 0;
foreach ($menuTypes as $menuType) {
$tabItems[$i] = new stdclass();
$tabItems[$i]->id = $menuType;
$LABEL_TRANSLATION = G::LoadTranslation("ID_" . strtoupper($menuType));
示例3: index
/**
* getting default list
*
* @param string $httpData (opional)
*/
public function index($httpData)
{
if ($this->userUxType == 'SINGLE') {
$this->indexSingle($httpData);
return;
}
require_once 'classes/model/UsersProperties.php';
G::LoadClass('process');
G::LoadClass('case');
$userProperty = new UsersProperties();
$process = new Process();
$case = new Cases();
G::loadClass('system');
$sysConf = System::getSystemConfiguration(PATH_CONFIG . 'env.ini');
//Get ProcessStatistics Info
$start = 0;
$limit = '';
$proData = $process->getAllProcesses($start, $limit);
$processList = $case->getStartCasesPerType($_SESSION['USER_LOGGED'], 'category');
$switchLink = $userProperty->getUserLocation($_SESSION['USER_LOGGED']);
if (!isset($_COOKIE['workspaceSkin'])) {
if (substr($sysConf['default_skin'], 0, 2) == 'ux') {
$_SESSION['_defaultUserLocation'] = $switchLink;
$switchLink = '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . $sysConf['default_skin'] . '/main';
}
}
unset($processList[0]);
//Get simplified options
global $G_TMP_MENU;
$mnu = new Menu();
$mnu->load('simplified');
$arrayMnuOption = array();
$mnuNewCase = array();
if (!empty($mnu->Options)) {
foreach ($mnu->Options as $index => $value) {
$option = array('id' => $mnu->Id[$index], 'url' => $mnu->Options[$index], 'label' => $mnu->Labels[$index], 'icon' => $mnu->Icons[$index], 'class' => $mnu->ElementClass[$index]);
if ($mnu->Id[$index] != 'S_NEW_CASE') {
$arrayMnuOption[] = $option;
} else {
$mnuNewCase = $option;
}
}
}
$this->setView($this->userUxBaseTemplate . PATH_SEP . 'index');
$this->setVar('usrUid', $this->userID);
$this->setVar('userName', $this->userName);
$this->setVar('processList', $processList);
$this->setVar('canStartCase', $case->canStartCase($_SESSION['USER_LOGGED']));
$this->setVar('userUxType', $this->userUxType);
$this->setVar('clientBrowser', $this->clientBrowser['name']);
$this->setVar('switchLink', $switchLink);
$this->setVar('arrayMnuOption', $arrayMnuOption);
$this->setVar('mnuNewCase', $mnuNewCase);
$this->render();
}
示例4: array
case 'PM_CASES':
$rows[] = array('id' => 'PM_CASES', 'name' => strtoupper(G::LoadTranslation('ID_CASES')));
break;
case 'PM_FACTORY':
$rows[] = array('id' => 'PM_FACTORY', 'name' => strtoupper(G::LoadTranslation('ID_APPLICATIONS')));
break;
case 'PM_DASHBOARD':
$rows[] = array('id' => 'PM_DASHBOARD', 'name' => strtoupper(G::LoadTranslation('ID_DASHBOARD')));
break;
}
}
print G::json_encode($rows);
break;
case 'defaultCasesMenuOptionList':
$oMenu = new Menu();
$oMenu->load('cases');
foreach ($oMenu->Id as $i => $item) {
if ($oMenu->Types[$i] != 'blockHeader') {
$rowsCasesMenu[] = array('id' => $item, 'name' => $oMenu->Labels[$i]);
}
}
print G::json_encode($rowsCasesMenu);
break;
case 'testPassword':
require_once 'classes/model/UsersProperties.php';
$oUserProperty = new UsersProperties();
$aFields = array();
$color = '';
$img = '';
$dateNow = date('Y-m-d H:i:s');
$aErrors = $oUserProperty->validatePassword($_POST['PASSWORD_TEXT'], $dateNow, $dateNow);
示例5: array
$fieldsList[] = array('FIELD_UID' => $field['sName'] . '-' . $field['sType'], 'FIELD_NAME' => $field['sName']);
}
}
} else {
list($gridName, $gridId) = explode('-', $table['ADD_TAB_GRID']);
$G_FORM = new Form($table['PRO_UID'] . '/' . $gridId, PATH_DYNAFORM, SYS_LANG, false);
$gridFields = $G_FORM->getVars(false);
foreach ($gridFields as $gfield) {
if (!in_array($gfield['sName'], $tableFields)) {
$fieldsList[] = array('FIELD_UID' => $gfield['sName'] . '-' . $gfield['sType'], 'FIELD_NAME' => $gfield['sName']);
}
}
}
$oHeadPublisher->assign('avFieldsList', $fieldsList);
}
$repTabPluginPermissions = false;
global $G_TMP_MENU;
$oMenu = new Menu();
$oMenu->load('setup');
foreach ($oMenu->Options as $i => $option) {
if ($oMenu->Types[$i] == 'private' && $oMenu->Id[$i] == 'PLUGIN_REPTAB_PERMISSIONS') {
$repTabPluginPermissions = array();
$repTabPluginPermissions['label'] = $oMenu->Labels[$i];
$repTabPluginPermissions['fn'] = $oMenu->Options[$i];
break;
}
}
$oHeadPublisher->assign('_plugin_permissions', $repTabPluginPermissions);
$oHeadPublisher->assign('PRO_UID', isset($_GET['PRO_UID']) ? $_GET['PRO_UID'] : false);
$oHeadPublisher->assign('TABLE', $table);
G::RenderPage('publish', 'extJs');
示例6: getProcess
function getProcess()
{
global $G_TMP_MENU;
global $userId;
if (!isset($_GET['item'])) {
die;
}
$oMenu = new Menu();
$oMenu->load('cases');
$type = $_GET['item'];
$oCases = new AppCacheView();
$aTypesID = array();
$aTypesID['CASES_INBOX'] = 'to_do';
$aTypesID['CASES_DRAFT'] = 'draft';
$aTypesID['CASES_CANCELLED'] = 'cancelled';
$aTypesID['CASES_SENT'] = 'sent';
$aTypesID['CASES_PAUSED'] = 'paused';
$aTypesID['CASES_COMPLETED'] = 'completed';
$aTypesID['CASES_SELFSERVICE'] = 'selfservice';
//$aTypesID['CASES_TO_REVISE'] = 'to_revise';
//$aTypesID['CASES_TO_REASSIGN'] = 'to_reassign';
$aTypesID = array('CASES_INBOX' => 'to_do', 'CASES_DRAFT' => 'draft', 'CASES_CANCELLED' => 'cancelled', 'CASES_SENT' => 'sent', 'CASES_PAUSED' => 'paused', 'CASES_COMPLETED' => 'completed', 'CASES_SELFSERVICE' => 'selfservice', 'CASES_TO_REVISE' => 'to_revise', 'CASES_TO_REASSIGN' => 'to_reassign');
$aCount = $oCases->getAllCounters(array($aTypesID[$type]), $userId, true);
$response = array();
//disabling the summary...
/*
$i=0;
foreach($aCount[$aTypesID[$type]]['sumary'] as $PRO_UID=>$process){
//{"text":"state","id":"src\/state","cls":"folder", loaded:true},
$response[$i] = new stdClass();
$response[$i]->text = $process['name'] . ' ('.$process['count'].')';
$response[$i]->id = $process['name'];
$response[$i]->cls = 'folder';
$response[$i]->loaded = true;
$i++;
}
*/
//ordering
/*for($i=0; $i<=count($response)-1; $i++){
for($j=$i+1; $j<=count($response); $j++){
echo $response[$j]->text .'<'. $response[$i]->text;
if($response[$j]->text[0] < $response[$i]->text[0]){
$x = $response[$i];
$response[$i] = $response[$j];
$response[$j] = $x;
}
}
}*/
echo G::json_encode($response);
}
示例7: _getSimpleReportPluginDef
/**
* Get simple report plugin definition
*
* @param $type
*/
protected function _getSimpleReportPluginDef()
{
global $G_TMP_MENU;
$oMenu = new Menu();
$oMenu->load('setup');
$repTabPluginPermissions = false;
foreach ($oMenu->Options as $i => $option) {
if ($oMenu->Types[$i] == 'private' && $oMenu->Id[$i] == 'PLUGIN_REPTAB_PERMISSIONS') {
$repTabPluginPermissions = array();
$repTabPluginPermissions['label'] = $oMenu->Labels[$i];
$repTabPluginPermissions['fn'] = $oMenu->Options[$i];
break;
}
}
return $repTabPluginPermissions;
}
示例8: Menu
$oHeadPublisher->addContent("cases/main");
//Adding a html file .html.
$keyMem = "USER_PREFERENCES" . $_SESSION["USER_LOGGED"];
$memcache =& PMmemcached::getSingleton(SYS_SYS);
if (($arrayConfig = $memcache->get($keyMem)) === false) {
$conf->loadConfig($x, "USER_PREFERENCES", "", "", $_SESSION["USER_LOGGED"], "");
$arrayConfig = $conf->aConfig;
$memcache->set($keyMem, $arrayConfig, PMmemcached::ONE_HOUR);
}
$confDefaultOption = "";
if (isset($arrayConfig["DEFAULT_CASES_MENU"])) {
//this user has a configuration record
$confDefaultOption = $arrayConfig["DEFAULT_CASES_MENU"];
global $G_TMP_MENU;
$oMenu = new Menu();
$oMenu->load("cases");
$defaultOption = "";
foreach ($oMenu->Id as $i => $id) {
if ($id == $confDefaultOption) {
$defaultOption = $oMenu->Options[$i];
break;
}
}
$defaultOption = $defaultOption != "" ? $defaultOption : "casesListExtJs";
} else {
$defaultOption = "casesListExtJs";
$confDefaultOption = "CASES_INBOX";
}
if (isset($_GET["id"]) && isset($_GET["id"])) {
$defaultOption = "../cases/open?APP_UID=" . $_GET["id"] . "&DEL_INDEX=" . $_GET["i"];
if (isset($_GET["a"])) {
示例9:
**/
?>
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<!-- Sidebar user panel -->
<?php
echo $this->events->apply_filters('before_dashboard_menu', '');
?>
<!-- search form -->
<!--
<form action="#" method="get" class="sidebar-form">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="Search..."/>
<span class="input-group-btn">
<button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
</span> </div>
</form>
-->
<!-- /.search form -->
<!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu">
<?php
Menu::load();
?>
</ul>
</section>
<!-- /.sidebar -->
</aside>
示例10: Menu
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*/
// $RBAC->requirePermissions('PM_SETUP');
$oHeadPublisher =& headPublisher::getSingleton();
global $G_TMP_MENU;
$oMenu = new Menu();
$oMenu->load('er2/hr');
$items = array();
$menuTypes = array_unique($oMenu->Types);
foreach ($menuTypes as $i => $v) {
if ($v == 'admToolsContent') {
unset($menuTypes[$i]);
break;
}
}
//sort($menuTypes);
$tabItems = array();
$i = 0;
foreach ($menuTypes as $menuType) {
$tabItems[$i]->id = $menuType;
$LABEL_TRANSLATION = G::LoadTranslation("ID_" . strtoupper($menuType));
if (substr($LABEL_TRANSLATION, 0, 2) !== '**') {