public function getPath($action, $params = array(), $env = null) { if ($this->getValueId()) { $params["value_id"] = $this->getValueId(); } $request = Zend_Controller_Front::getInstance()->getRequest(); $use_key = $request->useApplicationKey(); $path = null; $force_uri = stripos($action, "/") !== false; $uri = $force_uri ? $action : $this->getUri(); if ($uri) { if (!is_null($env)) { if (!$force_uri) { $uri .= $action; } if ($this->getData("{$env}_uri")) { $uri = $this->getData("{$env}_uri"); } if ($env == "mobile") { $request->useApplicationKey(true); } } if ($env != "desktop" and !$this->getIsAjax() and $this->getObject()->getLink()) { $path = $this->getObject()->getLink()->getUrl(); } else { $path = parent::getPath($uri, $params); } } else { $path = '/front/index/noroute'; } $request->useApplicationKey($use_key); return $path; }
public function getPath($uri = '', array $params = array(), $locale = null) { $request = Zend_Controller_Front::getInstance()->getRequest(); $useKey = (bool) $request->useApplicationKey(); $request->useApplicationKey(true); if ($this->getValueId()) { $param["value_id"] = $this->getValueId(); } $url = parent::getPath($uri, $params, $locale); $request->useApplicationKey($useKey); return $url; }