original_string: protected function submitEditCategoryGroup()
      {
          if ($this->isPosted('delete')) {
              $this->deleteCategoryGroup();
          } else if ($this->isPosted('save') && $this->validateEditCategoryGroup()) {
              if (isset($this->data_category_group['category_group_id'])) {
                  $this->updateCategoryGroup();
              } else {
                  $this->addCategoryGroup();
              }
          }
      }
code: protected function submitEditCategoryGroup()
      {
          if ($this->isPosted('delete')) {
              $this->deleteCategoryGroup();
          } else if ($this->isPosted('save') && $this->validateEditCategoryGroup()) {
              if (isset($this->data_category_group['category_group_id'])) {
                  $this->updateCategoryGroup();
              } else {
                  $this->addCategoryGroup();
              }
          }
      }
code_tokens: protected function submitEditCategoryGroup ( ) { if ( $ this -> isPosted ( 'delete' ) ) { $ this -> deleteCategoryGroup ( ) ; } else if ( $ this -> isPosted ( 'save' ) && $ this -> validateEditCategoryGroup ( ) ) { if ( isset ( $ this -> data_category_group [ 'category_group_id' ] ) ) { $ this -> updateCategoryGroup ( ) ; } else { $ this -> addCategoryGroup ( ) ; } } }
docstring: Handles a submitted category group data
docstring_tokens: Handles a submitted category group data