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


PHP Default_Model_Menu::getMenuText方法代码示例

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


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

示例1: breadcrumbs


//.........这里部分代码省略.........
                                                                                                         $breadCrumbsData .= '<span class="arrows">&rsaquo;</span>Background Checks<span class="arrows">&rsaquo;</span><span>Background Checks Agencies Report</span>';
                                                                                                     }
                                                                                                 }
                                                                                             }
                                                                                         }
                                                                                     }
                                                                                 }
                                                                             }
                                                                         }
                                                                     }
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     } else {
                                         $breadCrumbsData .= '<span>Analytics</span>';
                                     }
                                     $breadCrumbsData .= '</div>';
                                 } else {
                                     $breadCrumbsData = '<div class="breadcrumbs">';
                                     $url = "/" . $pageName;
                                     $breadCrumIds = $this->getBreadCrumDetails($url);
                                     $breadCrumNames = array();
                                     if (!empty($breadCrumIds)) {
                                         $menu_model = new Default_Model_Menu();
                                         $breadcrumstring = trim($breadCrumIds[0]['nav_ids'], ',');
                                         $breadcrumArr = explode(",", $breadcrumstring);
                                         $breadCrumNames = $breadCrumIds;
                                         $breadCrumbsData .= '<span class="firstbreadcrumb" onclick="window.location=\'' . $baseUrlString . '\'">Home</span> <span class="arrows">&rsaquo;</span> ';
                                         for ($b = 0; $b < sizeof($breadCrumNames); $b++) {
                                             $breadCrumNames[$b]['menuName'] = $menu_model->getMenuText($breadCrumNames[$b]['menuName']);
                                             if ($b == 0) {
                                                 if ($breadCrumNames[$b]['url'] == '/sitepreference') {
                                                     $breadCrumbsData .= '<span>' . $breadCrumNames[$b]['menuName'] . '</span>';
                                                 } else {
                                                     $breadCrumbsData .= '<span>' . $breadCrumNames[$b]['menuName'] . '</span> <span class="arrows">&rsaquo;</span> ';
                                                 }
                                             } else {
                                                 if ($b == sizeof($breadCrumNames) - 1) {
                                                     if ($actionName == '') {
                                                         $breadCrumbsData .= '<span>' . $breadCrumNames[$b]['menuName'] . '</span>';
                                                     } else {
                                                         $breadCrumbsData .= '<a href="' . $baseUrlString . $breadCrumNames[$b]['url'] . '" >' . $breadCrumNames[$b]['menuName'] . '</a>';
                                                     }
                                                 } else {
                                                     $breadCrumbsData .= '<span>' . $breadCrumNames[$b]['menuName'] . '</span> <span class="arrows">&rsaquo;</span> ';
                                                 }
                                             }
                                         }
                                         if ($actionName == 'add' || $actionName == 'edit' && $id_name == '' || $actionName != '' && $actionName != 'view') {
                                             if ($actionName == 'edit' || $actionName != '') {
                                                 $idvalindex = '';
                                                 if (in_array('id', $pageUrl)) {
                                                     $idindex = array_search('id', $pageUrl);
                                                     $idvalindex = $idindex + 1;
                                                 } else {
                                                     if (in_array('userid', $pageUrl)) {
                                                         $idindex = array_search('userid', $pageUrl);
                                                         $idvalindex = $idindex + 1;
                                                     }
                                                 }
                                                 if ((in_array('id', $pageUrl) || in_array('userid', $pageUrl)) && $pageName != 'myemployees') {
                                                     $idval = intval($pageUrl[$idvalindex]);
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:67,代码来源:Breadcrumbs.php

示例2: generateGrid

 /**
  *
  * @param string $name
  * @param array $fields
  * @param Zend_Paginator Instance $paginator
  * @param array $extracolumn
  * @param Bool  $sorting
  *
  * @return string
  */
 public function generateGrid($name, $fields = null, $paginator = null, $extracolumn = array(), $sorting = false, $jsGridFnname = '', $perPage = '5', $page = '1', $jsFillFnName = '', $searchArray = '', $formgrid = 'false', $addaction = '', $menuName = '', $unitId, $addpermission, $actns = '', $menunamestr, $call = '', $sortStr = '', $search_filters = '', $dashboardCall = 'No', $actnArr, $sortname = '', $by = '')
 {
     $request = Zend_Controller_Front::getInstance();
     $params = $request->getRequest()->getParams();
     $menu_model = new Default_Model_Menu();
     // Store Extra Columns
     $this->extra = $extracolumn;
     $sortIconStr = "";
     $sort = Zend_Controller_Front::getInstance()->getRequest()->getParam('sort', 'DESC');
     // checking and handling sorting.
     if ($sort == "") {
         $sortIconStr = "<span class='s-ico'>\n\t\t\t<span class='ui-icon-desc ui-state-disabled ui-icon ui-icon-triangle-1-n'></span>\n\t\t\t<span class='ui-icon-asc ui-state-disabled ui-icon ui-icon-triangle-1-s'></span></span>";
     } else {
         if ($sort == 'ASC') {
             $sort = 'DESC';
             //For Sort Icons....
             $sortIconStr = "<span class='s-ico'>\n\t\t\t<span class='ui-icon-desc ui-icon ui-icon-triangle-1-n'></span>\n\t\t\t</span>";
         } else {
             $sort = 'ASC';
             //For Sort Icons....
             $sortIconStr = "<span class='s-ico'>\n\t\t\t<span class='ui-icon-asc  ui-icon ui-icon-triangle-1-s'></span></span>";
         }
     }
     if ($addaction != '') {
         $action = $addaction;
         $popupaction = 'addpopup';
     } else {
         $action = "edit";
         $popupaction = 'editpopup';
     }
     $con = '';
     if ($formgrid != '') {
         if ($unitId != '') {
             $con = 'unitId/' . $unitId;
         } else {
             $con = 'unitId/' . $params['id'];
         }
         $output = "<div class='table-header'><span>" . $menuName . "</span><input type='button' title = 'Add' onclick='displaydeptform(\"" . DOMAIN . $name . '/' . $popupaction . "/{$con}/popup/1\",\"" . $menunamestr . "\")' value='Add Record' class='sprite addrecord' /></div>";
     } else {
         $menuName = $menu_model->getMenuText($menuName);
         $output = "<div class='table-header'><span>" . $menuName . "</span><input type='button' title = 'Add'  onclick='window.location.href=\"" . DOMAIN . $name . '/' . $action . "\"' value='Add Record' class='sprite addrecord' /></div>";
     }
     if ($addpermission == 'false') {
         $output = "<div class='table-header'><span>" . $menuName . "</span></div>";
     }
     if ($actns != '' && $actns == 'remove') {
         $output = "<div class='table-header'><span>" . $menuName . "</span></div>";
     }
     $output .= "<div id='" . $name . "' class='details_data_display_block newtablegrid'>";
     $output .= "<table class='grid' align='center'  width='100%' cellspacing='0' cellpadding='4' border='0'><thead><tr>";
     // this foreach loop display the column header  in �th� tag.
     $colinr = 0;
     if (!empty($fields)) {
         $tabindx = 0;
         if (empty($actnArr)) {
             unset($fields['action']);
         }
         foreach ($fields as $key => $value) {
             if (isset($value['align'])) {
                 $align = @$value['align'] != '' ? 'align="' . $value['align'] . '" ' : '';
             }
             if (isset($value['sortkey'])) {
                 $sortkey = @$value['sortkey'] != '' ? 'align="' . $value['sortkey'] . '" ' : '';
             }
             if (isset($value['style'])) {
                 $style = @$value['style'] != '' ? 'style="' . $value['style'] . '" ' : '';
             }
             $value = is_array($value) && !isset($value['sortkey']) ? $value['value'] : $value;
             if ($value == 'Action') {
                 $width = 'width=90';
             } else {
                 $width = '';
             }
             $output .= "<th " . $width . ">";
             // Check if Sorting is set to True
             if ($sorting) {
                 // Disable Sorting if Key is in Extra Columns
                 if (@$this->extra[$key]['name'] != '' && !is_array($value)) {
                     if ($value == "Action") {
                         $output .= "<span class='action-text'>Action</span>";
                     } else {
                         $output .= $value;
                     }
                 } else {
                     if (is_array($value)) {
                         $key = $value['sortkey'];
                         $value = $value['value'];
                     }
                     $welcome = 'false';
                     $urlString = $_SERVER['REQUEST_URI'];
//.........这里部分代码省略.........
开发者ID:lukkyrich,项目名称:sentrifugo,代码行数:101,代码来源:Requisitiongrid.php


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