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


PHP Menu::addItem方法代码示例

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


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

示例1: getMenu

 function getMenu()
 {
     $menu = new Menu($this->getName());
     $menu->addItem(new Menu_Item("?modus=news_create", "create"));
     $menu->addItem(new Menu_Item("?modus=news_show", "show"));
     return $menu->getMenu();
 }
开发者ID:microlefes,项目名称:Game,代码行数:7,代码来源:Module_News.php

示例2: Menu

 function print_dirtydates_menu()
 {
     $plugin_folder = 'admidio-db-dates';
     global $gCurrentUser;
     $dirtydatesmenu = new Menu('dirtydatesmenu', 'Terminzuabsagen');
     //Falls Datenbank nicht vorhanden Install-Skript starten
     $dirtydatesmenu->addItem('dirtydates_show', '/adm_plugins/' . $plugin_folder . '/dirtydates_adm_plugin.php?dd_userid=overview', 'Terminübersicht', '/icons/lists.png');
     if ($gCurrentUser->getValue('usr_id') != 0) {
         $dirtydatesmenu->addItem('dirtydates_change', '/adm_plugins/' . $plugin_folder . '/dirtydates_adm_plugin.php?dd_userid=' . $gCurrentUser->getValue('usr_id') . '', 'Meine Anwesenheit ändern', '/icons/profile.png');
     }
     echo '<div id="plgDirtydates" class="admidio-plugin-content">';
     echo $dirtydatesmenu->show();
     echo '</div>';
 }
开发者ID:sistlind,项目名称:admidio-db-dates,代码行数:14,代码来源:dirtydates_adm_plugin.php

示例3: createUserInterface

 /**
  * @see		View::createUserInterface()
  */
 protected function createUserInterface()
 {
     $resourceBundle = Application::getInstance()->getBundle();
     //Definição do título da página principal da aplicação
     $this->setTitle($resourceBundle->getString('MAIN_TITLE'));
     //Carregamento da folha de estilo principal da aplicação
     $this->addStyle('/css/application.css');
     //Painel principal
     $this->applicationPanel = $this->addChild(new Panel());
     $this->applicationPanel->setId('application');
     $topPanel = $this->applicationPanel->addChild(new Panel());
     $topPanel->setId('top');
     //Título da aplicação
     $topPanel->addChild(new Heading())->addChild(new Anchor('/'))->addChild(new Text($resourceBundle->getString('SHORT_TITLE')));
     //Criação do menu da aplicação
     $this->applicationMenu = $topPanel->addChild(new Menu());
     foreach ($resourceBundle->getResource('MENU') as $resourceItem) {
         $this->applicationMenu->addItem($resourceItem->getValue(), $resourceItem->getIterator()->current()->getValue());
     }
     //Painel de conteúdo
     $this->contentPanel = $this->applicationPanel->addChild(new Panel());
     $this->contentPanel->setId('content');
 }
开发者ID:rcastardo,项目名称:mvc-na-pratica,代码行数:26,代码来源:ApplicationView.php

示例4: getMenu

 function getMenu()
 {
     $menu = new Menu($this->getName());
     $menu->addItem(new Menu_Item("?modus=doyouknow_list", "list"));
     return $menu->getMenu();
 }
开发者ID:microlefes,项目名称:Game,代码行数:6,代码来源:Module_DoYouKnow.php

示例5: Menu

$moduleMenu->addItem('lists', '/adm_program/modules/lists/lists.php', $gL10n->get('LST_LISTS'), '/icons/lists.png');
if ($gValidLogin) {
    $moduleMenu->addItem('mylist', '/adm_program/modules/lists/mylist.php', $gL10n->get('LST_MY_LIST'), '/icons/mylist.png');
}
if ($gPreferences['enable_dates_module'] == 1 || $gPreferences['enable_dates_module'] == 2 && $gValidLogin) {
    $moduleMenu->addItem('dates', '/adm_program/modules/dates/dates.php', $gL10n->get('DAT_DATES'), '/icons/dates.png');
}
if ($gPreferences['enable_weblinks_module'] == 1 || $gPreferences['enable_weblinks_module'] == 2 && $gValidLogin) {
    $moduleMenu->addItem('links', '/adm_program/modules/links/links.php', $gL10n->get('LNK_WEBLINKS'), '/icons/weblinks.png');
}
echo $moduleMenu->show();
// Administration Menu
if ($gCurrentUser->approveUsers() || $gCurrentUser->editUsers() || $gCurrentUser->manageRoles() || $gCurrentUser->isWebmaster()) {
    $adminMenu = new Menu('administration', $gL10n->get('SYS_ADMINISTRATION'));
    if ($gCurrentUser->approveUsers() && $gPreferences['registration_mode'] > 0) {
        $adminMenu->addItem('newreg', '/adm_program/modules/registration/registration.php', $gL10n->get('NWU_NEW_REGISTRATIONS'), '/icons/new_registrations.png');
    }
    if ($gCurrentUser->editUsers()) {
        $adminMenu->addItem('usrmgt', '/adm_program/modules/members/members.php', $gL10n->get('MEM_USER_MANAGEMENT'), '/icons/user_administration.png');
    }
    if ($gCurrentUser->manageRoles()) {
        $adminMenu->addItem('roladm', '/adm_program/modules/roles/roles.php', $gL10n->get('ROL_ROLE_ADMINISTRATION'), '/icons/roles.png');
    }
    if ($gCurrentUser->isWebmaster()) {
        $adminMenu->addItem('dbback', '/adm_program/modules/backup/backup.php', $gL10n->get('BAC_DATABASE_BACKUP'), '/icons/backup.png');
        $adminMenu->addItem('orgprop', '/adm_program/modules/preferences/preferences.php', $gL10n->get('SYS_SETTINGS'), '/icons/options.png');
    }
    echo $adminMenu->show();
}
?>
                </div><!-- closes "div#plugin_menu" -->
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:my_body_bottom.php

示例6: getMenu

 function getMenu()
 {
     $menu = new Menu($this->getName());
     $menu->addItem(new Menu_Item("?modus=award_list", "list"));
     $menu->addItem(new Menu_Item("?modus=award_decorate_player", "decorate player"));
     $menu->addItem(new Menu_Item("?modus=award_decorate_tribe", "decorate tribe"));
     return $menu->getMenu();
 }
开发者ID:agatho,项目名称:uaenhanced,代码行数:8,代码来源:Module_Awards.php

示例7: extractLanguage

	while ( $oRs->moveNext() )
	{
		$cdMenu = extractLanguage( $oRs->aFields['cdMenu'], $this->getLanguage()) ;
		$cUrl = substr($oRs->aFields['cUrl'], 0, 7) == 'http://' ? $oRs->aFields['cUrl'] : '?' . $oRs->aFields['cUrl'] . '&amp;ncMenu=' . $oRs->aFields['ncMenu'];
		$oMenuEntornos->addItem( extractLanguage( $oRs->aFields['cdMenu'], $this->getLanguage()) , $cUrl, 'body', $oRs->aFields['cDescripcion'], $oRs->aFields['bExpandido'], '', '', '', $oRs->aFields['ncMenu']  );
		$nIndex++;
	}
	$oMenuPpal = new Menu('body', 'menu_ppal', 'menu_ppal', true, 'mn');
	$oMenuPpal->setValue( '1.' .$aMenu[ncEntorno] .'.'. $aMenu[nSeccion] .'.' );
	$cSql = "SELECT ncMenu, cdMenu, cUrl, bExpandido, cDescripcion, cCamino FROM gtMenu WHERE ncEstadoPublicacion = 2 AND ncMenuPadre = " . $aMenu[ncEntorno];
	$oRs = $this->oDatabase->recordset($cSql);
	while ( $oRs->moveNext() )
	{
		$cdMenu = extractLanguage( $oRs->aFields['cdMenu'], $this->getLanguage()) ;
		$cUrl = substr($oRs->aFields['cUrl'], 0, 7) == 'http://' ? $oRs->aFields['cUrl'] : '?' . $oRs->aFields['cUrl'] . '&amp;pe=' . $aMenu[ncEntorno]. '.&amp;ncMenu=' . $oRs->aFields['ncMenu'];
		$oMenuPpal->addItem( $cdMenu, $cUrl, 'body', $oRs->aFields['cDescripcion'], $oRs->aFields['bExpandido'], '', '', '', $oRs->aFields['cCamino'] .  $oRs->aFields['ncMenu'] . '.'  );
	}
	//echo "<link  rel='stylesheet'  href='/bue/css/".strtolower(extractLanguage($cEntorno,'es')).".css' type='text/css' />";
	//$aModule[$cModule]->addStyleSheet( $cEntorno.".css" );

?>

<div id="head">
	<div class="barra_entorno">
		<div style="margin-top:20px"><a href="http://www.buenosaires.gob.ar"><img src="imagenes/logoBA_<?php 
echo $aMenu[ncEntorno];
?>
.gif" width="202" height="43" style="border:none" alt="Gobierno de Buenos Aires" /></a></div>
	</div>
	<div class="subcontainer">
		<!-- ingreso y buscador -->
开发者ID:khayal,项目名称:buegov,代码行数:31,代码来源:head_inc.php

示例8: TestTheme

// create new TestTheme object
$theme = new TestTheme();
$theme->addHeadContent("<style type=text/css>body {font-size:18px}</style>");
// create the two layouts for navigation
$topMenuLayout = new TopMenuLayout();
$leftMenuLayout = new LeftMenuLayout();
// create two menus
$topMenu = new Menu();
$leftMenu = new Menu();
// add links to the top menu
$topMenu->addItem(new HeaderMenuItem("Top Menu:"));
$topMenu->addItem(new LinkMenuItem("Link1", "http://www.middlebury.edu"));
$topMenu->addItem(new LinkMenuItem("New window", "http://google.com", false, "_blank"));
$topMenu->addItem(new LinkMenuItem("JavaScript Alert", "#", false, null, "onclick='alert(\"testing\")'", "style='text-decoration:none' "));
// add links to the left menu
$leftMenu->addItem(new HeaderMenuItem("Left Menu"));
$leftMenu->addItem(new LinkMenuItem("Link1", "http://www.middlebury.edu"));
$leftMenu->addItem(new LinkMenuItem("New window", "http://google.com", false, "_blank"));
$leftMenu->addItem(new LinkMenuItem("JavaScript Alert", "#", false, null, "onclick='alert(\"testing\")'", "style='text-decoration:none' "));
// add the menus to their respective layouts
$topMenuLayout->setComponent(0, $topMenu);
$leftMenuLayout->setComponent(0, $leftMenu);
// create a new SingleContentLayout to fill the space in the LefMenuLayout
$contentLayout = new SingleContentLayout();
//$contentLayout->setComponent(0,new Content("This theme is called: ".$theme->getName().", description: ".$theme->getDescription()));
$content = "<b>The contents of this file:</b><br/>";
$content .= highlight_string(implode("", file(__FILE__)), true);
$content .= "<br/><br/>";
$content .= "<b>The contens of TestTheme's template file (is uses a template):</b><br/>";
$content .= highlight_string(implode("", file(HARMONI . "themeHandler/TestTheme.tpl")), true);
$contentLayout->setComponent(0, new Content($content));
开发者ID:adamfranco,项目名称:harmoni,代码行数:31,代码来源:testThemes.php

示例9: Menu

<?php

$menu = new Menu();
$myDB = new DBFactory();
$sql = $myDB->getMysqlConnexionWithPDO();
$query = $sql->prepare("SELECT * FROM admin_menu WHERE lang = :lang ORDER BY id ASC");
$query->execute(array(':lang' => 'FR'));
$results = $query->fetchAll();
foreach ($results as $result) {
    if ($result['parent'] > 0) {
        $nav[$result['id']] = $nav[$result['parent']]->addItem($result['caption'], $result['link'], $result['title'], "", "");
        if ($nav[$result['parent']]->getLevel() > 1) {
            $nav[$result['parent']]->setClass("parent");
        }
    } else {
        $nav[$result['id']] = $menu->addItem($result['caption'], $result['link'], $result['title'], "", "");
    }
}
$template = $menu->getHtml();
开发者ID:dexz,项目名称:dev-extaze,代码行数:19,代码来源:admin_nav.php


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