original_string: protected function addCountryState()
      {
          $this->controlAccess('state_add');
  
          if ($this->state->add($this->getSubmitted())) {
              $url = "admin/settings/states/{$this->data_country['code']}";
              $this->redirect($url, $this->text('Country state has been added'), 'success');
          }
  
          $this->redirect('', $this->text('Country state has not been added'), 'warning');
      }
code: protected function addCountryState()
      {
          $this->controlAccess('state_add');
  
          if ($this->state->add($this->getSubmitted())) {
              $url = "admin/settings/states/{$this->data_country['code']}";
              $this->redirect($url, $this->text('Country state has been added'), 'success');
          }
  
          $this->redirect('', $this->text('Country state has not been added'), 'warning');
      }
code_tokens: protected function addCountryState ( ) { $ this -> controlAccess ( 'state_add' ) ; if ( $ this -> state -> add ( $ this -> getSubmitted ( ) ) ) { $ url = "admin/settings/states/{$this->data_country['code']}" ; $ this -> redirect ( $ url , $ this -> text ( 'Country state has been added' ) , 'success' ) ; } $ this -> redirect ( '' , $ this -> text ( 'Country state has not been added' ) , 'warning' ) ; }
docstring: Adds a new country state
docstring_tokens: Adds a new country state