public function searchAction($path)
    {
        try {
            $this->setPath($path);
        } catch (NotFoundException $e) {
            throw $e;
        }

        $search = $this->wdb->getRequest()->getArgument('s');
        if (empty($search)) {
            return $this->indexAction($path);
        }

        $_s = Helper::makeSearch($search, $this->getPath());

        $title          = _T('Search for "%search_str%"', array('search_str'=>$search));
        $breadcrumbs    = TemplateHelper::getBreadcrumbs($this->getPath());
        $breadcrumbs[]  = $title;
        $dbfile         = new WDBFile($this->getpath());
        $page           = $dbfile->getWDBStack();
        $page['type']   = 'search';
        $tpl_params     = array(
            'page'          => $page,
            'breadcrumbs'   => $breadcrumbs,
            'title'         => $title,
        );

        $search_content = $this->wdb->display($_s, 'search', array(
            'search_str'    => $search,
            'path'          => TemplateHelper::buildPageTitle($this->getPath()),
        ));
        return array('default', $search_content, $tpl_params);
    }
public function searchAction($path)
    {
        try {
            $this->setPath($path);
        } catch (NotFoundException $e) {
            throw $e;
        }

        $search = $this->wdb->getRequest()->getArgument('s');
        if (empty($search)) {
            return $this->indexAction($path);
        }

        $_s = Helper::makeSearch($search, $this->getPath());

        $title          = _T('Search for "%search_str%"', array('search_str'=>$search));
        $breadcrumbs    = TemplateHelper::getBreadcrumbs($this->getPath());
        $breadcrumbs[]  = $title;
        $dbfile         = new WDBFile($this->getpath());
        $page           = $dbfile->getWDBStack();
        $page['type']   = 'search';
        $tpl_params     = array(
            'page'          => $page,
            'breadcrumbs'   => $breadcrumbs,
            'title'         => $title,
        );

        $search_content = $this->wdb->display($_s, 'search', array(
            'search_str'    => $search,
            'path'          => TemplateHelper::buildPageTitle($this->getPath()),
        ));
        return array('default', $search_content, $tpl_params);
    }
public function searchAction ( $ path ) { try { $ this -> setPath ( $ path ) ; } catch ( NotFoundException $ e ) { throw $ e ; } $ search = $ this -> wdb -> getRequest ( ) -> getArgument ( 's' ) ; if ( empty ( $ search ) ) { return $ this -> indexAction ( $ path ) ; } $ _s = Helper :: makeSearch ( $ search , $ this -> getPath ( ) ) ; $ title = _T ( 'Search for "%search_str%"' , array ( 'search_str' => $ search ) ) ; $ breadcrumbs = TemplateHelper :: getBreadcrumbs ( $ this -> getPath ( ) ) ; $ breadcrumbs [ ] = $ title ; $ dbfile = new WDBFile ( $ this -> getpath ( ) ) ; $ page = $ dbfile -> getWDBStack ( ) ; $ page [ 'type' ] = 'search' ; $ tpl_params = array ( 'page' => $ page , 'breadcrumbs' => $ breadcrumbs , 'title' => $ title , ) ; $ search_content = $ this -> wdb -> display ( $ _s , 'search' , array ( 'search_str' => $ search , 'path' => TemplateHelper :: buildPageTitle ( $ this -> getPath ( ) ) , ) ) ; return array ( 'default' , $ search_content , $ tpl_params ) ; }
Global search action of a path

@param string $path
@return array
@throws \WebDocBook\Exception\NotFoundException
Global search action of a path