예제 #1
0
 /**
  * Clears an URI from navigation parameters and returns it.
  * @param Web\Uri $uri
  * @param bool $sef SEF mode.
  * @return Web\Uri
  */
 public function clearParams(Web\Uri $uri, $sef)
 {
     if ($sef == true) {
         $path = $uri->getPath();
         $path = preg_replace("'/" . preg_quote($this->id, "'") . "/page-([\\d]|all)+(/size-([\\d]+))?'", "", $path);
         $uri->setPath($path);
     } else {
         $uri->deleteParams(array($this->id));
     }
     return $uri;
 }