You are here

public function DateAnonymizer::anonymize in General Data Protection Regulation 8

Same name and namespace in other branches
  1. 8.2 modules/anonymizer/src/Plugin/Anonymizer/DateAnonymizer.php \Drupal\anonymizer\Plugin\Anonymizer\DateAnonymizer::anonymize()
  2. 3.0.x modules/anonymizer/src/Plugin/Anonymizer/DateAnonymizer.php \Drupal\anonymizer\Plugin\Anonymizer\DateAnonymizer::anonymize()

Return an anonymized output.

The input. @var \Drupal\Core\Field\FieldItemListInterface|null $field The field being anonymized.

Return value

int|string The anonymized output.

Overrides AnonymizerInterface::anonymize

File

modules/anonymizer/src/Plugin/Anonymizer/DateAnonymizer.php, line 24

Class

DateAnonymizer
Class TextAnonymizer.

Namespace

Drupal\anonymizer\Plugin\Anonymizer

Code

public function anonymize($input, FieldItemListInterface $field = NULL) {
  return $this->faker
    ->generator()
    ->date();
}