1 | <?php |
||
15 | class AnonymizerService implements Anonymizer |
||
16 | { |
||
17 | /** |
||
18 | * @var \Netgen\InformationCollection\Doctrine\Repository\EzInfoCollectionRepository |
||
19 | */ |
||
20 | protected $collectionRepository; |
||
21 | |||
22 | /** |
||
23 | * @var \Netgen\InformationCollection\Doctrine\Repository\EzInfoCollectionAttributeRepository |
||
24 | */ |
||
25 | protected $collectionAttributeRepository; |
||
26 | |||
27 | /** |
||
28 | * @var \eZ\Publish\API\Repository\Repository |
||
29 | */ |
||
30 | protected $repository; |
||
31 | |||
32 | /** |
||
33 | * @var \Netgen\InformationCollection\API\Persistence\Anonymizer\Visitor\FieldAnonymizerVisitor |
||
34 | */ |
||
35 | protected $fieldAnonymizerVisitor; |
||
36 | |||
37 | /** |
||
38 | * Anonymizer constructor. |
||
39 | * |
||
40 | * @param \eZ\Publish\API\Repository\Repository $repository |
||
41 | * @param \Netgen\InformationCollection\Doctrine\Repository\EzInfoCollectionRepository $collectionRepository |
||
42 | * @param \Netgen\InformationCollection\Doctrine\Repository\EzInfoCollectionAttributeRepository $collectionAttributeRepository |
||
43 | * @param \Netgen\InformationCollection\API\Persistence\Anonymizer\Visitor\FieldAnonymizerVisitor $fieldAnonymizerVisitor |
||
44 | */ |
||
45 | public function __construct( |
||
56 | |||
57 | public function anonymizeCollection($collectionId, array $fields = []): void |
||
67 | |||
68 | /** |
||
69 | * @param \Netgen\InformationCollection\Doctrine\Entity\EzInfoCollection $collection |
||
70 | * @param array $fields |
||
71 | * |
||
72 | * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException |
||
73 | * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException |
||
74 | */ |
||
75 | protected function destroyData(EzInfoCollection $collection, array $fields = []) |
||
98 | |||
99 | /** |
||
100 | * @param \Netgen\InformationCollection\Doctrine\Entity\EzInfoCollectionAttribute[] $attributes |
||
101 | */ |
||
102 | protected function anonymize(array $attributes, ContentType $contentType) |
||
111 | } |
||
112 |