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

        $dbfile = new WDBFile($this->getPath());
        if ($dbfile->isDir()) {
            return $this->directoryAction($this->getPath());
        }

        $tpl_params = array(
            'page'          => $dbfile->getWDBFullStack(),
            'breadcrumbs'   => TemplateHelper::getBreadcrumbs($this->getPath()),
            'title'         => TemplateHelper::buildPageTitle($this->getPath()),
        );
        if (empty($tpl_params['title'])) {
            if (!empty($tpl_params['breadcrumbs'])) {
                $tpl_params['title'] = TemplateHelper::buildPageTitle(end($tpl_params['breadcrumbs']));
            } else {
                $tpl_params['title'] = _T('Home');
            }
        }
        $content = $dbfile->viewFileInfos($tpl_params);

        return array('default',
            $content,
            $tpl_params);
    }
public function fileAction($path)
    {
        try {
            $this->setPath($path);
        } catch (NotFoundException $e) {
            throw $e;
        }

        $dbfile = new WDBFile($this->getPath());
        if ($dbfile->isDir()) {
            return $this->directoryAction($this->getPath());
        }

        $tpl_params = array(
            'page'          => $dbfile->getWDBFullStack(),
            'breadcrumbs'   => TemplateHelper::getBreadcrumbs($this->getPath()),
            'title'         => TemplateHelper::buildPageTitle($this->getPath()),
        );
        if (empty($tpl_params['title'])) {
            if (!empty($tpl_params['breadcrumbs'])) {
                $tpl_params['title'] = TemplateHelper::buildPageTitle(end($tpl_params['breadcrumbs']));
            } else {
                $tpl_params['title'] = _T('Home');
            }
        }
        $content = $dbfile->viewFileInfos($tpl_params);

        return array('default',
            $content,
            $tpl_params);
    }
public function fileAction ( $ path ) { try { $ this -> setPath ( $ path ) ; } catch ( NotFoundException $ e ) { throw $ e ; } $ dbfile = new WDBFile ( $ this -> getPath ( ) ) ; if ( $ dbfile -> isDir ( ) ) { return $ this -> directoryAction ( $ this -> getPath ( ) ) ; } $ tpl_params = array ( 'page' => $ dbfile -> getWDBFullStack ( ) , 'breadcrumbs' => TemplateHelper :: getBreadcrumbs ( $ this -> getPath ( ) ) , 'title' => TemplateHelper :: buildPageTitle ( $ this -> getPath ( ) ) , ) ; if ( empty ( $ tpl_params [ 'title' ] ) ) { if ( ! empty ( $ tpl_params [ 'breadcrumbs' ] ) ) { $ tpl_params [ 'title' ] = TemplateHelper :: buildPageTitle ( end ( $ tpl_params [ 'breadcrumbs' ] ) ) ; } else { $ tpl_params [ 'title' ] = _T ( 'Home' ) ; } } $ content = $ dbfile -> viewFileInfos ( $ tpl_params ) ; return array ( 'default' , $ content , $ tpl_params ) ; }
File path action

@param string $path
@return array
@throws \WebDocBook\Exception\NotFoundException
File path action