You are here

function gdpr_tasks_field_metatdata_property_info_alter in General Data Protection Regulation 7

Field entity metadata property callback.

See also

\gdpr_tasks_field_info_alter()

1 string reference to 'gdpr_tasks_field_metatdata_property_info_alter'
gdpr_tasks_field_info_alter in modules/gdpr_tasks/gdpr_tasks.module
Implements hook_field_info_alter().

File

modules/gdpr_tasks/gdpr_tasks.module, line 861
Module file for the GDPR Tasks module.

Code

function gdpr_tasks_field_metatdata_property_info_alter(&$info, $entity_type, $field, $instance, $field_type) {
  $name = $field['field_name'];
  $property =& $info[$entity_type]['bundles'][$instance['bundle']]['properties'][$name];
  $type = entity_property_extract_innermost_type($property['type']);
  switch ($type) {
    case 'date':
      $property['gdpr sars callback'] = 'gdpr_tasks_sars_callback_date';
      break;
    case 'field_item_name':
      $property['gdpr sars callback'] = 'gdpr_tasks_sars_callback_name_field';
      break;
    case 'addressfield':
      $property['gdpr sars callback'] = 'gdpr_tasks_sars_callback_address_field';
      break;
    case 'commerce_price':
      $property['gdpr sars callback'] = 'gdpr_tasks_sars_callback_commerce_price';
      break;
  }
}