當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Navigation_Page::get方法代碼示例

本文整理匯總了PHP中Zend_Navigation_Page::get方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Navigation_Page::get方法的具體用法?PHP Zend_Navigation_Page::get怎麽用?PHP Zend_Navigation_Page::get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Navigation_Page的用法示例。


在下文中一共展示了Zend_Navigation_Page::get方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getLiClass

 function getLiClass(Zend_Navigation_Page $subPage, $isActive)
 {
     if ($isActive && $this->_activeClass) {
         return ' class="' . $this->_activeClass . '"';
     }
     if ($subPage->get('disabled') && $this->_disabledClass) {
         return ' class="' . $this->_disabledClass . '"';
     }
     if ($this->_normalClass) {
         return ' class="' . $this->_normalClass . '"';
     }
 }
開發者ID:subashemphasize,項目名稱:test_site,代碼行數:12,代碼來源:Menu.php

示例2: getLiClass

 function getLiClass(Zend_Navigation_Page $subPage, $isActive)
 {
     $class = '';
     if ($isActive && $this->_activeClass) {
         $class .= $this->_activeClass . ' ';
     } elseif ($subPage->get('disabled') && $this->_disabledClass) {
         $class .= $this->_disabledClass . ' ';
     } elseif ($this->_normalClass) {
         $class .= $this->_normalClass . ' ';
     }
     if ($subPage->hasChildren()) {
         $class .= $this->_hasChildrenClass . ' ';
     }
     if ($class = trim($class)) {
         return " class=\"{$class}\"";
     }
 }
開發者ID:grlf,項目名稱:eyedock,代碼行數:17,代碼來源:Menu.php

示例3: _acceptAcl

 /**
  * Determines whether a page should be accepted by ACL when iterating
  *
  * Rules:
  * - If helper has no ACL, page is accepted
  * - If page has a resource or privilege defined, page is accepted
  *   if the ACL allows access to it using the helper's role
  * - If page has no resource or privilege, page is accepted
  *
  * @param  Zend_Navigation_Page $page  page to check
  * @return bool                        whether page is accepted by ACL
  */
 protected function _acceptAcl(Zend_Navigation_Page $page)
 {
     if (true == $page->get('invalid')) {
         return false;
     }
     return parent::_acceptAcl($page);
 }
開發者ID:starflash,項目名稱:ZtChart-ZF1-Example,代碼行數:19,代碼來源:MvcMenu.php

示例4: htmlify

 public function htmlify(Zend_Navigation_Page $page)
 {
     // get label and title for translating
     $label = $page->getLabel();
     $title = $page->getTitle();
     // translate label and title?
     if ($this->getUseTranslator() && ($t = $this->getTranslator())) {
         if (is_string($label) && !empty($label)) {
             $label = $t->translate($label);
         }
         if (is_string($title) && !empty($title)) {
             $title = $t->translate($title);
         }
     }
     // get attribs for element
     $attribs = array('id' => $page->getId(), 'title' => $title);
     if (false === $this->getAddPageClassToLi()) {
         $attribs['class'] = $page->getClass();
     }
     // does page have a href?
     if ($href = $page->getHref()) {
         $element = 'a';
         $attribs['href'] = $href;
         $attribs['target'] = $page->getTarget();
         $attribs['accesskey'] = $page->getAccesskey();
     } else {
         $element = 'span';
     }
     // Add custom HTML attributes
     $attribs = array_merge($attribs, $page->getCustomHtmlAttribs());
     if ($page->get('icon') != null) {
         return '<' . $element . $this->_htmlAttribs($attribs) . '>' . '<i class="fa ' . $page->get('icon') . '"> ' . '</i>' . $this->view->escape($label) . '</' . $element . '>';
     } else {
         return '<' . $element . $this->_htmlAttribs($attribs) . '>' . $this->view->escape($label) . '</' . $element . '>';
     }
 }
開發者ID:dafik,項目名稱:dfi,代碼行數:36,代碼來源:Menu.php

示例5: toXtype

 public function toXtype(Zend_Navigation_Page $page)
 {
     // get label and title for translating
     $label = $page->getLabel();
     $title = $page->getTitle();
     // translate label and title?
     if ($this->getUseTranslator() && ($t = $this->getTranslator())) {
         if (is_string($label) && !empty($label)) {
             $label = $t->translate($label);
         }
         if (is_string($title) && !empty($title)) {
             $title = $t->translate($title);
         }
     }
     // get attribs for element
     $attribs = array('id' => $page->getId(), 'text' => $label, 'iconCls' => $page->get('iconClass'), 'cls' => $page->getClass());
     // does page have a href?
     if ($href = $page->getHref()) {
         $attribs['href'] = $href;
         $attribs['hrefTarget'] = $page->getTarget();
     }
     foreach ($attribs as $key => &$attr) {
         if (empty($attr)) {
             unset($attribs[$key]);
         }
     }
     return $attribs;
 }
開發者ID:roed,項目名稱:zend-mvc-extend,代碼行數:28,代碼來源:Extjs.php


注:本文中的Zend_Navigation_Page::get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。