original_string: protected function submitEditUserRole()
      {
          if ($this->isPosted('delete')) {
              $this->deleteUserRole();
          } else if ($this->isPosted('save') && $this->validateEditUserRole()) {
              if (isset($this->data_role['role_id'])) {
                  $this->updateUserRole();
              } else {
                  $this->addUserRole();
              }
          }
      }
code: protected function submitEditUserRole()
      {
          if ($this->isPosted('delete')) {
              $this->deleteUserRole();
          } else if ($this->isPosted('save') && $this->validateEditUserRole()) {
              if (isset($this->data_role['role_id'])) {
                  $this->updateUserRole();
              } else {
                  $this->addUserRole();
              }
          }
      }
code_tokens: protected function submitEditUserRole ( ) { if ( $ this -> isPosted ( 'delete' ) ) { $ this -> deleteUserRole ( ) ; } else if ( $ this -> isPosted ( 'save' ) && $ this -> validateEditUserRole ( ) ) { if ( isset ( $ this -> data_role [ 'role_id' ] ) ) { $ this -> updateUserRole ( ) ; } else { $ this -> addUserRole ( ) ; } } }
docstring: Handles a submitted user role data
docstring_tokens: Handles a submitted user role data