You are here

function civicrm_entity_price_set_field_field_update in CiviCRM Entity 7.2

Implements hook_field_update().

Parameters

$entity_type:

$entity:

$field:

$instance:

$langcode:

$items:

File

modules/civicrm_entity_price_set_field/civicrm_entity_price_set_field.module, line 291

Code

function civicrm_entity_price_set_field_field_update($entity_type, $entity, $field, $instance, $langcode, &$items) {
  if ($entity_type == 'civicrm_event') {
    if (empty($items[0]['price_set_id']) && !is_numeric($items[0]['price_set_id'])) {
      return;
    }
    else {
      if (!empty($entity->id)) {
        _civicrm_entity_price_set_field_process_field_items($entity_type, $entity->id, $field, $instance, $items);
      }
    }
  }
}