コード例 #1
0
ファイル: WpMvc.php プロジェクト: jasmun/Noco100
 /**
  * Returns href for this page
  *
  * This method uses {@link IfwPsn_Vendor_Zend_Controller_Action_Helper_Url} to assemble
  * the href based on the page's properties.
  *
  * @return string  page href
  */
 public function getHref()
 {
     if ($this->_hrefCache) {
         return $this->_hrefCache;
     }
     if (null === self::$_urlHelper) {
         self::$_urlHelper = IfwPsn_Vendor_Zend_Controller_Action_HelperBroker::getStaticHelper('Url');
     }
     $params = $this->getParams();
     if ($param = $this->getModule()) {
         $params['module'] = $param;
     }
     if ($param = $this->getController()) {
         $params[IfwPsn_Zend_Controller_Front::getInstance()->getRequest()->getControllerKey()] = $param;
     }
     if ($param = $this->getAction()) {
         $params[IfwPsn_Zend_Controller_Front::getInstance()->getRequest()->getActionKey()] = $param;
     }
     if ($param = $this->getPage()) {
         $params['page'] = $param;
     }
     if ($param = $this->getAdminpage()) {
         $params['adminpage'] = $param;
     }
     if ($param = $this->getEditpage()) {
         $params['editpage'] = $param;
     }
     if ($param = $this->getPosttype()) {
         $params['posttype'] = $param;
     }
     $url = self::$_urlHelper->url($params, $this->getRoute(), $this->getResetParams(), $this->getEncodeUrl());
     // Add the fragment identifier if it is set
     $fragment = $this->getFragment();
     if (null !== $fragment) {
         $url .= '#' . $fragment;
     }
     return $this->_hrefCache = $url;
 }
コード例 #2
0
ファイル: Navigation.php プロジェクト: jasmun/Noco100
 /**
  * @param $navigation
  */
 public function addRecipientsListsNav(IfwPsn_Vendor_Zend_Navigation $navigation)
 {
     $page = new IfwPsn_Zend_Navigation_Page_WpMvc(array('label' => __('Recipients lists', 'psn'), 'controller' => 'index', 'action' => 'adRecipientsLists', 'page' => $this->_pm->getPathinfo()->getDirname(), 'route' => 'requestVars'));
     $page->set('exactActiveMatch', true);
     $navigation->addPage($page);
 }