| @@ 11-39 (lines=29) @@ | ||
| 8 | * Class AddUserRequestDataTransformer |
|
| 9 | * @package OmnideskBundle\DataTransformer\Request |
|
| 10 | */ |
|
| 11 | class AddUserRequestDataTransformer implements DataTransformerInterface |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * @param AddUserRequest $value |
|
| 15 | * @return array |
|
| 16 | */ |
|
| 17 | public function transform($value) |
|
| 18 | { |
|
| 19 | return [ |
|
| 20 | 'user_email' => $value->getEmail(), |
|
| 21 | 'user_phone' => $value->getPhone(), |
|
| 22 | 'user_full_name' => $value->getFullName(), |
|
| 23 | 'company_name' => $value->getCompanyName(), |
|
| 24 | 'company_position' => $value->getCompanyPosition(), |
|
| 25 | 'user_note' => $value->getNote(), |
|
| 26 | 'language_id' => $value->getLanguageId(), |
|
| 27 | 'custom_fields' => $value->getCustomFields(), |
|
| 28 | ]; |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @param array $value |
|
| 33 | * @return AddUserRequest |
|
| 34 | */ |
|
| 35 | public function reverseTransform($value) |
|
| 36 | { |
|
| 37 | throw new \LogicException('Method not implemented.'); |
|
| 38 | } |
|
| 39 | } |
|
| 40 | ||
| @@ 11-39 (lines=29) @@ | ||
| 8 | * Class EditUserRequestDataTransformer |
|
| 9 | * @package OmnideskBundle\DataTransformer\Request |
|
| 10 | */ |
|
| 11 | class EditUserRequestDataTransformer implements DataTransformerInterface |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * @param EditUserRequest $value |
|
| 15 | * @return array |
|
| 16 | */ |
|
| 17 | public function transform($value) |
|
| 18 | { |
|
| 19 | return [ |
|
| 20 | 'user_id' => $value->getUserId(), |
|
| 21 | 'user_email' => $value->getEmail(), |
|
| 22 | 'user_full_name' => $value->getFullName(), |
|
| 23 | 'company_name' => $value->getCompanyName(), |
|
| 24 | 'company_position' => $value->getCompanyPosition(), |
|
| 25 | 'user_note' => $value->getNote(), |
|
| 26 | 'language_id' => $value->getLanguageId(), |
|
| 27 | 'custom_fields' => $value->getCustomFields(), |
|
| 28 | ]; |
|
| 29 | } |
|
| 30 | ||
| 31 | /** |
|
| 32 | * @param array $value |
|
| 33 | * @return EditUserRequest |
|
| 34 | */ |
|
| 35 | public function reverseTransform($value) |
|
| 36 | { |
|
| 37 | throw new \LogicException('Method not implemented.'); |
|
| 38 | } |
|
| 39 | } |
|
| 40 | ||
| @@ 11-38 (lines=28) @@ | ||
| 8 | * Class ListUserRequestDataTransformer |
|
| 9 | * @package OmnideskBundle\DataTransformer\Request |
|
| 10 | */ |
|
| 11 | class ListUserRequestDataTransformer implements DataTransformerInterface |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * @param ListUserRequest $value |
|
| 15 | * @return array |
|
| 16 | */ |
|
| 17 | public function transform($value) |
|
| 18 | { |
|
| 19 | return [ |
|
| 20 | 'page' => $value->getPage(), |
|
| 21 | 'limit' => $value->getLimit(), |
|
| 22 | 'user_phone' => $value->getPhone(), |
|
| 23 | 'user_email' => $value->getEmail(), |
|
| 24 | 'language_id' => $value->getLanguageId(), |
|
| 25 | 'custom_fields' => $value->getCustomFields(), |
|
| 26 | 'amount_of_cases' => $value->isAmountOfCases(), |
|
| 27 | ]; |
|
| 28 | } |
|
| 29 | ||
| 30 | /** |
|
| 31 | * @param array $value |
|
| 32 | * @return ListUserRequest |
|
| 33 | */ |
|
| 34 | public function reverseTransform($value) |
|
| 35 | { |
|
| 36 | throw new \LogicException('Method not implemented.'); |
|
| 37 | } |
|
| 38 | } |
|
| 39 | ||