/** * Method to override the uri function to include automatic inclusion * of mode and restriction * * @access public * @param array $params Associative array of parameter values * @param string $module Name of module to point to (blank for core actions) * @param string $mode The URI mode to use, must be one of 'push', 'pop', or 'preserve' * @param string $omitServerName flag to produce relative URLs * @param bool $javascriptCompatibility flag to produce javascript compatible URLs * @param bool $omitExtraParams Remove extra flags for mode and restrictions * @returns string $uri the URL */ public function uri($params = array(), $module = '', $mode = '', $omitServerName = FALSE, $javascriptCompatibility = FALSE, $omitExtraParams = FALSE) { if ($params == NULL) { $params = array(); } if (is_array($params) && !array_key_exists('mode', $params) && $this->getParam('mode') != '') { $params['mode'] = $this->getParam('mode'); } if (is_array($params) && !array_key_exists('restriction', $params) && $this->getParam('restriction') != '') { $params['restriction'] = $this->getParam('restriction'); } if (is_array($params) && !empty($params) && !array_key_exists('forcerestrictions', $params) && !is_null($this->getParam('forcerestrictions'))) { $params['forcerestrictions'] = $this->getParam('forcerestrictions'); } if (is_array($params) && !array_key_exists('name', $params) && $this->getParam('name') != '') { $params['name'] = $this->getParam('name'); } if (is_array($params) && !array_key_exists('context', $params) && $this->getParam('context') != '') { $params['context'] = $this->getParam('context'); } if (is_array($params) && !array_key_exists('workgroup', $params) && $this->getParam('workgroup') != '') { $params['workgroup'] = $this->getParam('workgroup'); } if ($omitExtraParams) { unset($params['mode']); unset($params['restriction']); unset($params['name']); unset($params['context']); unset($params['workgroup']); } return parent::uri($params, $module, $mode, $omitServerName, $javascriptCompatibility); }