Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
| PlattformKonfigJsonService | |
0.00% |
0 / 6 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
| parseCustomField | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setEncodedValue | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| removeEncodedValue | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php declare(strict_types=1); |
| 2 | |
| 3 | namespace Satag\AmicronEntityBundle\Service; |
| 4 | |
| 5 | use Satag\AmicronEntityBundle\Entity\Kontakt; |
| 6 | use Satag\AmicronEntityBundle\Util\CustomFields\CustomFieldsJson; |
| 7 | |
| 8 | class PlattformKonfigJsonService extends AbstractPlattformKonfigService |
| 9 | { |
| 10 | protected function parseCustomField(Kontakt $configEntity, string $dataIdentifier): array |
| 11 | { |
| 12 | $config = new CustomFieldsJson($configEntity, $this->getCustmConfigurationField(), $dataIdentifier); |
| 13 | |
| 14 | return [$dataIdentifier => $config->getArray()]; |
| 15 | } |
| 16 | |
| 17 | protected function setEncodedValue(Kontakt $configEntity, string $dataIdentifier, mixed $data): void |
| 18 | { |
| 19 | $config = new CustomFieldsJson($configEntity, $this->getCustmConfigurationField(), $dataIdentifier); |
| 20 | $config->merge($data); |
| 21 | } |
| 22 | |
| 23 | protected function removeEncodedValue(Kontakt $configEntity, string $dataIdentifier): void |
| 24 | { |
| 25 | $config = new CustomFieldsJson($configEntity, $this->getCustmConfigurationField(), $dataIdentifier); |
| 26 | $config->remove(); |
| 27 | } |
| 28 | } |