public function filterbox($path, $config = array())
    {
        if (is_array($path)) {
            $path = $this->_template->getView()->getRoute($path);
        }

        //remove q from the url
        $uri = $this->getService('anahita:http.url', array('url' => $path));
        $data = $uri->getQuery(true);

        unset($data['q']);

        $uri->setQuery($data);

        $path = (string) $uri;

        $placeholder = isset($config['placeholder']) ? $config['placeholder'] : AnTranslator::_('LIB-AN-FILTER-PLACEHOLDER');

        $config = new AnConfig($config);

        $config->append(array(
            'search_action' => $path,
            'update_element' => false,
            'placeholder' => $placeholder
        ));

        return $this->_render('filterbox',  $config);
    }
public function filterbox($path, $config = array())
    {
        if (is_array($path)) {
            $path = $this->_template->getView()->getRoute($path);
        }

        //remove q from the url
        $uri = $this->getService('anahita:http.url', array('url' => $path));
        $data = $uri->getQuery(true);

        unset($data['q']);

        $uri->setQuery($data);

        $path = (string) $uri;

        $placeholder = isset($config['placeholder']) ? $config['placeholder'] : AnTranslator::_('LIB-AN-FILTER-PLACEHOLDER');

        $config = new AnConfig($config);

        $config->append(array(
            'search_action' => $path,
            'update_element' => false,
            'placeholder' => $placeholder
        ));

        return $this->_render('filterbox',  $config);
    }
public function filterbox ( $ path , $ config = array ( ) ) { if ( is_array ( $ path ) ) { $ path = $ this -> _template -> getView ( ) -> getRoute ( $ path ) ; } //remove q from the url $ uri = $ this -> getService ( 'anahita:http.url' , array ( 'url' => $ path ) ) ; $ data = $ uri -> getQuery ( true ) ; unset ( $ data [ 'q' ] ) ; $ uri -> setQuery ( $ data ) ; $ path = ( string ) $ uri ; $ placeholder = isset ( $ config [ 'placeholder' ] ) ? $ config [ 'placeholder' ] : AnTranslator :: _ ( 'LIB-AN-FILTER-PLACEHOLDER' ) ; $ config = new AnConfig ( $ config ) ; $ config -> append ( array ( 'search_action' => $ path , 'update_element' => false , 'placeholder' => $ placeholder ) ) ; return $ this -> _render ( 'filterbox' , $ config ) ; }
Renders a filterbox.

@param array $config Configuration

@returns	void
Renders a filterbox .