private function Anonymizer::getSanitizerId in General Data Protection Regulation 7
Gets the ID of the sanitizer plugin to use on this field.
Parameters
array $field_info: The field to anonymise.
Return value
string The sanitizer ID or null.
1 call to Anonymizer::getSanitizerId()
- Anonymizer::anonymize in modules/
gdpr_tasks/ src/ Anonymizer.php - Runs anonymize functionality against a field.
File
- modules/
gdpr_tasks/ src/ Anonymizer.php, line 254
Class
- Anonymizer
- Anonymizes or removes field values for GDPR.
Code
private function getSanitizerId(array $field_info) {
// First check if this field has a sanitizer defined.
$sanitizer = $field_info['plugin']->settings['gdpr_fields_sanitizer'];
// @todo Allow sanitizers to fall back to type selection relevant for the field type.
if (!$sanitizer) {
$sanitizer = 'gdpr_sanitizer_text';
}
return $sanitizer;
}