protected function LinkWithSearch($link) {
        // Whitelist to avoid side effects
        $params=array(
                    'q'=>(array)$this->request->getVar('q'),
                    'tag'=>$this->request->getVar('tag'),
                    'creator'=>$this->request->getVar('creator'),
                    'ParentID'=>$this->request->getVar('ParentID')
                );
        
        $link=Controller::join_links(
                                    $link,
                                    (array_filter(array_values($params)) ? '?'.http_build_query($params):null)
                                );
        
        $this->extend('updateLinkWithSearch', $link);
        return $link;
    }
protected function LinkWithSearch($link) {
        // Whitelist to avoid side effects
        $params=array(
                    'q'=>(array)$this->request->getVar('q'),
                    'tag'=>$this->request->getVar('tag'),
                    'creator'=>$this->request->getVar('creator'),
                    'ParentID'=>$this->request->getVar('ParentID')
                );
        
        $link=Controller::join_links(
                                    $link,
                                    (array_filter(array_values($params)) ? '?'.http_build_query($params):null)
                                );
        
        $this->extend('updateLinkWithSearch', $link);
        return $link;
    }
protected function LinkWithSearch ( $ link ) { // Whitelist to avoid side effects $ params = array ( 'q' => ( array ) $ this -> request -> getVar ( 'q' ) , 'tag' => $ this -> request -> getVar ( 'tag' ) , 'creator' => $ this -> request -> getVar ( 'creator' ) , 'ParentID' => $ this -> request -> getVar ( 'ParentID' ) ) ; $ link = Controller :: join_links ( $ link , ( array_filter ( array_values ( $ params ) ) ? '?' . http_build_query ( $ params ) : null ) ) ; $ this -> extend ( 'updateLinkWithSearch' , $ link ) ; return $ link ; }
Generates the link with search params
@param {string} Link to
@return {string} Link with search params
Generates the link with search params