src/Transformer/JsonSchemaForm/PhoneNumberTransformer.php line 28

  1. <?php
  2. declare(strict_types=1);
  3. /**
  4.  * Copyright (c) 2019 TECLA Consulting Group oü.
  5.  * All rights reserved.
  6.  *
  7.  * This unpublished material is proprietary to TECLA Consulting Group oü.
  8.  * All rights reserved. The methods and
  9.  * techniques described herein are considered trade secrets
  10.  * and/or confidential. Reproduction or distribution, in whole
  11.  * or in part, is forbidden except by express written permission
  12.  * of TECLA Consulting Group oü.
  13.  *
  14.  * @author    Matúš Sýkorjak <matus@tecla.no>
  15.  * @copyright 2019 TECLA Consulting Group oü
  16.  */
  17. namespace App\Transformer\JsonSchemaForm;
  18. use Symfony\Component\Form\FormInterface;
  19. class PhoneNumberTransformer extends AbstractTransformer
  20. {
  21.     /**
  22.      * {@inheritdoc}
  23.      */
  24.     public function transform(FormInterface $form, array $extensions = [], string $widget null): array
  25.     {
  26.         $schema = ['type' => 'tel'];
  27.         $schema $this->addCommonSpecs($form$schema$widget$extensions);
  28.         return $schema;
  29.     }
  30. }