original_string: protected function submitEditPriceRule()
      {
          if ($this->isPosted('delete')) {
              $this->deletePriceRule();
          } else if ($this->isPosted('save') && $this->validateEditPriceRule()) {
              if (isset($this->data_rule['price_rule_id'])) {
                  $this->updatePriceRule();
              } else {
                  $this->addPriceRule();
              }
          }
      }
code: protected function submitEditPriceRule()
      {
          if ($this->isPosted('delete')) {
              $this->deletePriceRule();
          } else if ($this->isPosted('save') && $this->validateEditPriceRule()) {
              if (isset($this->data_rule['price_rule_id'])) {
                  $this->updatePriceRule();
              } else {
                  $this->addPriceRule();
              }
          }
      }
code_tokens: protected function submitEditPriceRule ( ) { if ( $ this -> isPosted ( 'delete' ) ) { $ this -> deletePriceRule ( ) ; } else if ( $ this -> isPosted ( 'save' ) && $ this -> validateEditPriceRule ( ) ) { if ( isset ( $ this -> data_rule [ 'price_rule_id' ] ) ) { $ this -> updatePriceRule ( ) ; } else { $ this -> addPriceRule ( ) ; } } }
docstring: Handles a submitted price rule
docstring_tokens: Handles a submitted price rule