original_string: protected function submitEditProductClass()
      {
          if ($this->isPosted('delete') && $this->canDeleteProductClass()) {
              $this->deleteProductClass();
          } else if ($this->isPosted('save') && $this->validateEditProductClass()) {
              if (isset($this->data_product_class['product_class_id'])) {
                  $this->updateProductClass();
              } else {
                  $this->addProductClass();
              }
          }
      }
code: protected function submitEditProductClass()
      {
          if ($this->isPosted('delete') && $this->canDeleteProductClass()) {
              $this->deleteProductClass();
          } else if ($this->isPosted('save') && $this->validateEditProductClass()) {
              if (isset($this->data_product_class['product_class_id'])) {
                  $this->updateProductClass();
              } else {
                  $this->addProductClass();
              }
          }
      }
code_tokens: protected function submitEditProductClass ( ) { if ( $ this -> isPosted ( 'delete' ) && $ this -> canDeleteProductClass ( ) ) { $ this -> deleteProductClass ( ) ; } else if ( $ this -> isPosted ( 'save' ) && $ this -> validateEditProductClass ( ) ) { if ( isset ( $ this -> data_product_class [ 'product_class_id' ] ) ) { $ this -> updateProductClass ( ) ; } else { $ this -> addProductClass ( ) ; } } }
docstring: Handles a submitted product class
docstring_tokens: Handles a submitted product class