DateAnonymizer.php in General Data Protection Regulation 3.0.x
Same filename and directory in other branches
Namespace
Drupal\anonymizer\Plugin\AnonymizerFile
modules/anonymizer/src/Plugin/Anonymizer/DateAnonymizer.phpView source
<?php
namespace Drupal\anonymizer\Plugin\Anonymizer;
use Drupal\anonymizer\Anonymizer\AnonymizerBase;
use Drupal\Core\Field\FieldItemListInterface;
/**
* Class TextAnonymizer.
*
* @Anonymizer(
* id = "date_anonymizer",
* label = @Translation("Date anonymizer"),
* description = @Translation("Provides anonymization functionality intended to be used for datetime fields.")
* )
*
* @package Drupal\anonymizer\Plugin\Anonymizer
*/
class DateAnonymizer extends AnonymizerBase {
/**
* {@inheritdoc}
*/
public function anonymize($input, FieldItemListInterface $field = NULL) {
return $this->faker
->generator()
->date();
}
}
Classes
Name | Description |
---|---|
DateAnonymizer | Class TextAnonymizer. |