/** * Returns href for this page * * This method uses {@link 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 = \Zend\Controller\Action\HelperBroker\HelperBroker::getStaticHelper('URL'); } $params = $this->getParams(); if (($param = $this->getModule()) != null) { $params['module'] = $param; } if (($param = $this->getController()) != null) { $params['controller'] = $param; } if (($param = $this->getAction()) != null) { $params['action'] = $param; } $url = self::$_urlHelper->__invoke($params, $this->getRoute(), $this->getResetParams()); //var_dump($url); return $this->_hrefCache = $url; }
/** * Returns href for this page * * This method uses {@link 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) { $front = FrontController::getInstance(); $broker = $front->getHelperBroker(); self::$_urlHelper = $broker->load('url'); } $params = $this->getParams(); if (($param = $this->getModule()) != null) { $params['module'] = $param; } if (($param = $this->getController()) != null) { $params['controller'] = $param; } if (($param = $this->getAction()) != null) { $params['action'] = $param; } $url = self::$_urlHelper->__invoke($params, $this->getRoute(), $this->getResetParams()); return $this->_hrefCache = $url; }
/** * Returns href for this page * * This method uses {@link 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) { $front = FrontController::getInstance(); $broker = $front->getHelperBroker(); self::$_urlHelper = $broker->load('url'); } $params = $this->getParams(); if (($param = $this->getModule()) != null) { $params['module'] = $param; } if (($param = $this->getController()) != null) { $params['controller'] = $param; } if (($param = $this->getAction()) != null) { $params['action'] = $param; } $url = self::$_urlHelper->__invoke($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; }