public function drupalFormSubmit($values, $storage) {

    $this->populateFromDrupalForm($values, $storage);

    try {
      $save_result = $this->save();
    }
    catch (Exception $e) {
      $this->errorName = 'Save Error';
      $this->errorMsg = t('Failed to save object.  Your form data was not saved.');
      $this->hasError = TRUE;
    }

  }
public function drupalFormSubmit($values, $storage) {

    $this->populateFromDrupalForm($values, $storage);

    try {
      $save_result = $this->save();
    }
    catch (Exception $e) {
      $this->errorName = 'Save Error';
      $this->errorMsg = t('Failed to save object.  Your form data was not saved.');
      $this->hasError = TRUE;
    }

  }
public function drupalFormSubmit ( $ values , $ storage ) { $ this -> populateFromDrupalForm ( $ values , $ storage ) ; try { $ save_result = $ this -> save ( ) ; } catch ( Exception $ e ) { $ this -> errorName = 'Save Error' ; $ this -> errorMsg = t ( 'Failed to save object.  Your form data was not saved.' ) ; $ this -> hasError = TRUE ; } }
method to respond to successfully validated form submit.

@param array $values as $form_state['values'] from drupal form api
@param array $storage as $form_state['storage'] from drupal form api

@return by reference to $form array
method to respond to successfully validated form submit .