protected function submitEditCategory()
    {
        if ($this->isPosted('delete')) {
            $this->deleteCategory();
        } else if ($this->isPosted('save') && $this->validateEditCategory()) {
            $this->deleteImagesCategory();
            if (isset($this->data_category['category_id'])) {
                $this->updateCategory();
            } else {
                $this->addCategory();
            }
        }
    }
protected function submitEditCategory()
    {
        if ($this->isPosted('delete')) {
            $this->deleteCategory();
        } else if ($this->isPosted('save') && $this->validateEditCategory()) {
            $this->deleteImagesCategory();
            if (isset($this->data_category['category_id'])) {
                $this->updateCategory();
            } else {
                $this->addCategory();
            }
        }
    }
protected function submitEditCategory ( ) { if ( $ this -> isPosted ( 'delete' ) ) { $ this -> deleteCategory ( ) ; } else if ( $ this -> isPosted ( 'save' ) && $ this -> validateEditCategory ( ) ) { $ this -> deleteImagesCategory ( ) ; if ( isset ( $ this -> data_category [ 'category_id' ] ) ) { $ this -> updateCategory ( ) ; } else { $ this -> addCategory ( ) ; } } }
Saves a submitted category
Saves a submitted category