public function indexAction()
 {
     $this->view->setLayout('catalog');
     $this->view->categories = Category::find();
     $this->view->products = Product::find();
 }
 /**
  * Update a category
  * 
  * @param Category $category
  * @return int
  */
 public function updateCategory(Category $category)
 {
     return $this->update($category->toArray(), array('category_id' => $category->category_id));
 }