src/controllers/CategoryController.php
public function showCategory($category, $pagenumber = 1)
    {
        if (!$this->category->exists($category)) {
            return \Response::view($this->theme.'.404', array('global' => $this->global), 404);
        }

        $categoryObject = $this->category->getCategory($category);
        $parent = $this->category->getParentCategory($category);
        $subCategories = $this->category->getSubCategories($category);
        $posts = $this->post->getAll($category);

        $viewParamaters = array(
            'global' => $this->global,
            'category' => $categoryObject,
            'parent' => $parent,
            'subCategories' => $subCategories,
            'posts' => $posts,
            'pageNumber' => $pagenumber
        );

        return \View::make($this->theme.'.category', $viewParamaters);
    }
public function showCategory($category, $pagenumber = 1)
    {
        if (!$this->category->exists($category)) {
            return \Response::view($this->theme.'.404', array('global' => $this->global), 404);
        }

        $categoryObject = $this->category->getCategory($category);
        $parent = $this->category->getParentCategory($category);
        $subCategories = $this->category->getSubCategories($category);
        $posts = $this->post->getAll($category);

        $viewParamaters = array(
            'global' => $this->global,
            'category' => $categoryObject,
            'parent' => $parent,
            'subCategories' => $subCategories,
            'posts' => $posts,
            'pageNumber' => $pagenumber
        );

        return \View::make($this->theme.'.category', $viewParamaters);
    }
public function showCategory ( $ category , $ pagenumber = 1 ) { if ( ! $ this -> category -> exists ( $ category ) ) { return \ Response :: view ( $ this -> theme . '.404' , array ( 'global' => $ this -> global ) , 404 ) ; } $ categoryObject = $ this -> category -> getCategory ( $ category ) ; $ parent = $ this -> category -> getParentCategory ( $ category ) ; $ subCategories = $ this -> category -> getSubCategories ( $ category ) ; $ posts = $ this -> post -> getAll ( $ category ) ; $ viewParamaters = array ( 'global' => $ this -> global , 'category' => $ categoryObject , 'parent' => $ parent , 'subCategories' => $ subCategories , 'posts' => $ posts , 'pageNumber' => $ pagenumber ) ; return \ View :: make ( $ this -> theme . '.category' , $ viewParamaters ) ; }
Show a category.
@param  string $category The category to show.
@return \View
Show a category .