You are here

public static function wf_crm_webform_postprocess::singleton in Webform CiviCRM Integration 7.4

Same name and namespace in other branches
  1. 7.5 includes/wf_crm_webform_postprocess.inc \wf_crm_webform_postprocess::singleton()

This is first called during form validation. We create an instance of this object and stash it in a static variable. It is destroyed and rebuilt between each page submission, but after (successful) validation of the final page, this cache allows the object instance to persist throughout (final) validate, preSave and postSave operations.

Parameters

stdClass $node:

Return value

wf_crm_webform_postprocess

4 calls to wf_crm_webform_postprocess::singleton()
webform_civicrm_webform_submission_insert in ./webform_civicrm.module
Implements hook_webform_submission_insert(). Uses cached instance of wf_crm_webform_postprocess that was created during validation.
webform_civicrm_webform_submission_presave in ./webform_civicrm.module
Implements hook_webform_submission_presave(). Uses cached instance of wf_crm_webform_postprocess that was created during validation.
webform_civicrm_webform_submission_update in ./webform_civicrm.module
Implements hook_webform_submission_update(). Uses cached instance of wf_crm_webform_postprocess that was created during validation.
wf_crm_validate in ./webform_civicrm.module
Validation callback for webform submissions.

File

includes/wf_crm_webform_postprocess.inc, line 58

Class

wf_crm_webform_postprocess

Code

public static function singleton($node) {
  if (!self::$singleton) {
    self::$singleton = new wf_crm_webform_postprocess($node);
  }
  return self::$singleton;
}