You are here

function hook_gdpr_fields_default_field_data in General Data Protection Regulation 7

Imports ctools exportable GDPR field settings from code.

Return value

array An array of field settings definitions.

1 function implements hook_gdpr_fields_default_field_data()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

gdpr_fields_gdpr_fields_default_field_data in modules/gdpr_fields/gdpr_fields.module
Implements hook_gdpr_fields_default_field_data().

File

modules/gdpr_fields/gdpr_fields.api.php, line 14
Hooks provided by the GDPR fields module.

Code

function hook_gdpr_fields_default_field_data() {
  $export = array();
  $field = new GDPRFieldData();
  $field->disabled = FALSE;

  /* Edit this to true to make a default field disabled initially */
  $field->name = 'user|user|mail';
  $field->entity_type = 'user';
  $field->entity_bundle = 'user';
  $field->property_name = 'mail';
  $field->settings = array(
    'gdpr_fields_enabled' => '1',
    'gdpr_fields_rta' => 'inc',
    'gdpr_fields_rtf' => 'anonymise',
    'gdpr_fields_sanitizer' => 'EmailSanitizer',
    'gdpr_fields_notes' => '',
    'label' => 'Email',
  );
  $export['user|user|mail'] = $field;
  return $export;
}