original_string: protected function addPriceRule()
      {
          $this->controlAccess('price_rule_add');
  
          if ($this->price_rule->add($this->getSubmitted())) {
              $this->redirect('admin/sale/price', $this->text('Price rule has been added'), 'success');
          }
  
          $this->redirect('', $this->text('Price rule has not been added'), 'warning');
      }
code: protected function addPriceRule()
      {
          $this->controlAccess('price_rule_add');
  
          if ($this->price_rule->add($this->getSubmitted())) {
              $this->redirect('admin/sale/price', $this->text('Price rule has been added'), 'success');
          }
  
          $this->redirect('', $this->text('Price rule has not been added'), 'warning');
      }
code_tokens: protected function addPriceRule ( ) { $ this -> controlAccess ( 'price_rule_add' ) ; if ( $ this -> price_rule -> add ( $ this -> getSubmitted ( ) ) ) { $ this -> redirect ( 'admin/sale/price' , $ this -> text ( 'Price rule has been added' ) , 'success' ) ; } $ this -> redirect ( '' , $ this -> text ( 'Price rule has not been added' ) , 'warning' ) ; }
docstring: Adds a new price rule
docstring_tokens: Adds a new price rule