You are here

function webform_civicrm_civicrm_post in Webform CiviCRM Integration 8.5

Same name and namespace in other branches
  1. 6.2 webform_civicrm.module \webform_civicrm_civicrm_post()
  2. 7.5 webform_civicrm.module \webform_civicrm_civicrm_post()
  3. 7.2 webform_civicrm.module \webform_civicrm_civicrm_post()
  4. 7.3 webform_civicrm.module \webform_civicrm_civicrm_post()
  5. 7.4 webform_civicrm.module \webform_civicrm_civicrm_post()

Implements hook_civicrm_post().

Handles delete of a custom field.

TODO: In theory, this could also handle save, and we don't need to implement the above hook. However, this hook dosen't support CustomField in CiviCRM < 4.7.14 (or LTS < 4.6.24).

Parameters

string $op:

string $name:

int $id:

CRM_Core_DAO $dao:

File

./webform_civicrm.module, line 302
Webform CiviCRM Integration Module: Links webform submissions to contacts in a CiviCRM database. @author Coleman Watts

Code

function webform_civicrm_civicrm_post($op, $name, $id, $dao) {
  if ($name == 'CustomField' && $op == 'delete') {
    $admin_form = \Drupal::service('webform_civicrm.admin_form');
    $admin_form::handleDynamicCustomField($op, $id, $dao->custom_group_id);
  }
}