Ejemplo n.º 1
0
 /**
  * Set submitted settings on the category object.
  *
  * @param \titania_category $category	Category object.
  * @return \titania_category
  */
 protected function set_submitted_settings($category)
 {
     $category->__set_array(array('category_name' => $this->request->variable('category_name', '', true), 'category_name_clean' => $this->request->variable('category_name_clean', '', true), 'parent_id' => $this->request->variable('category_parent', 0), 'category_visible' => $this->request->variable('category_visible', 1), 'category_type' => $this->request->variable('category_type', 0), 'category_options' => 0));
     // Set category options
     foreach ($category->available_options as $option => $flag) {
         if ($this->request->variable($option, false)) {
             $category->set_option($option);
         }
     }
     return $category;
 }