protected function setCategory($category_id)
    {
        $this->data_category = array();

        if (is_numeric($category_id)) {

            //Set unexisting language code to get original titles.
            //Otherwise it will be translated to the current language
            $conditions = array(
                'language' => 'und',
                'category_id' => $category_id
            );

            $this->data_category = $this->category->get($conditions);

            if (empty($this->data_category)) {
                $this->outputHttpStatus(404);
            }

            $this->prepareCategory($this->data_category);
        }
    }
protected function setCategory($category_id)
    {
        $this->data_category = array();

        if (is_numeric($category_id)) {

            //Set unexisting language code to get original titles.
            //Otherwise it will be translated to the current language
            $conditions = array(
                'language' => 'und',
                'category_id' => $category_id
            );

            $this->data_category = $this->category->get($conditions);

            if (empty($this->data_category)) {
                $this->outputHttpStatus(404);
            }

            $this->prepareCategory($this->data_category);
        }
    }
protected function setCategory ( $ category_id ) { $ this -> data_category = array ( ) ; if ( is_numeric ( $ category_id ) ) { //Set unexisting language code to get original titles. //Otherwise it will be translated to the current language $ conditions = array ( 'language' => 'und' , 'category_id' => $ category_id ) ; $ this -> data_category = $ this -> category -> get ( $ conditions ) ; if ( empty ( $ this -> data_category ) ) { $ this -> outputHttpStatus ( 404 ) ; } $ this -> prepareCategory ( $ this -> data_category ) ; } }
Sets an array of category data
@param integer $category_id
Sets an array of category data