public function search($config = array())
    {
        $actor = null;
        $label = AnTranslator::_('LIB-AN-SEARCH-PLACEHOLDER');

        if ($this->getService()->has('com:search.owner')) {
            $actor = $this->getService('com:search.owner');
            $label = AnTranslator::sprintf('LIB-AN-SEARCH-PLACEHOLDER-OWNER', $actor->name);
        }

        $scope = null;

        if ($this->getService()->has('com:search.scope')) {
            $scope = $this->getService('com:search.scope');
        }

        $url = 'index.php?option=com_search';

        if ($actor) {
            $url .= '&oid='.$actor->uniqueAlias;
        }

        $term = AnRequest::get('get.term', 'raw');
        $term = AnService::get('com:search.filter.term')->sanitize($term);

        $config = new AnConfig($config);

        $config->append(array(
            'label' => $label,
            'term' => $term,
            'url' => $url,
            'actor' => $actor,
            'scope' => $scope,
        ));

        return $this->_render('search',  $config);
    }
public function search($config = array())
    {
        $actor = null;
        $label = AnTranslator::_('LIB-AN-SEARCH-PLACEHOLDER');

        if ($this->getService()->has('com:search.owner')) {
            $actor = $this->getService('com:search.owner');
            $label = AnTranslator::sprintf('LIB-AN-SEARCH-PLACEHOLDER-OWNER', $actor->name);
        }

        $scope = null;

        if ($this->getService()->has('com:search.scope')) {
            $scope = $this->getService('com:search.scope');
        }

        $url = 'index.php?option=com_search';

        if ($actor) {
            $url .= '&oid='.$actor->uniqueAlias;
        }

        $term = AnRequest::get('get.term', 'raw');
        $term = AnService::get('com:search.filter.term')->sanitize($term);

        $config = new AnConfig($config);

        $config->append(array(
            'label' => $label,
            'term' => $term,
            'url' => $url,
            'actor' => $actor,
            'scope' => $scope,
        ));

        return $this->_render('search',  $config);
    }
public function search ( $ config = array ( ) ) { $ actor = null ; $ label = AnTranslator :: _ ( 'LIB-AN-SEARCH-PLACEHOLDER' ) ; if ( $ this -> getService ( ) -> has ( 'com:search.owner' ) ) { $ actor = $ this -> getService ( 'com:search.owner' ) ; $ label = AnTranslator :: sprintf ( 'LIB-AN-SEARCH-PLACEHOLDER-OWNER' , $ actor -> name ) ; } $ scope = null ; if ( $ this -> getService ( ) -> has ( 'com:search.scope' ) ) { $ scope = $ this -> getService ( 'com:search.scope' ) ; } $ url = 'index.php?option=com_search' ; if ( $ actor ) { $ url .= '&oid=' . $ actor -> uniqueAlias ; } $ term = AnRequest :: get ( 'get.term' , 'raw' ) ; $ term = AnService :: get ( 'com:search.filter.term' ) -> sanitize ( $ term ) ; $ config = new AnConfig ( $ config ) ; $ config -> append ( array ( 'label' => $ label , 'term' => $ term , 'url' => $ url , 'actor' => $ actor , 'scope' => $ scope , ) ) ; return $ this -> _render ( 'search' , $ config ) ; }
Renders a search.

@param array $config Configuration

@returns	void
Renders a search .