src/V4/Model/Params/Params.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\V4\Model\Params;
  3. use ApiPlatform\Core\Annotation\ApiProperty;
  4. use App\Model\IriNormalizableInterface;
  5. use App\Model\NormalizeAsIRITrait;
  6. use App\Model\Traits\ImportableObjectTrait;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. class Params implements IriNormalizableInterface
  9. {
  10.     use ImportableObjectTrait;
  11.     use NormalizeAsIRITrait;
  12.     /**
  13.      * @ApiProperty(identifier=true)
  14.      *
  15.      * @var string
  16.      * @Groups({
  17.      *     "product:list", "product:read", "product:write", "product:update",
  18.      *     "prospect:list", "prospect:read", "prospect:write", "prospect:update",
  19.      *     "contact:list", "contact:read", "contact:write", "contact:update"
  20.      * * })
  21.      */
  22.     protected $id;
  23.     /**
  24.      * @var string|null
  25.      * @Groups({
  26.      *     "product:list", "product:read", "product:write", "product:update",
  27.      *     "prospect:list", "prospect:read", "prospect:write", "prospect:update",
  28.      *     "contact:list", "contact:read", "contact:write", "contact:update"
  29.      * })
  30.      */
  31.     protected $value;
  32.     /**
  33.      * @var string|null
  34.      * @Groups({
  35.      *     "product:list", "product:read", "product:write", "product:update",
  36.      *     "prospect:list", "prospect:read", "prospect:write", "prospect:update",
  37.      *     "contact:list", "contact:read", "contact:write", "contact:update"
  38.      * })
  39.      */
  40.     protected $customerId;
  41.     /**
  42.      * @var string|null
  43.      * @Groups({
  44.      *     "product:list", "product:read",
  45.      *     "prospect:list", "prospect:read",
  46.      *     "contact:list", "contact:read"
  47.      * })
  48.      */
  49.     protected $order;
  50.     /**
  51.      * @var bool|null
  52.      * @Groups({
  53.      *     "product:list", "product:read",
  54.      *     "prospect:list", "prospect:read",
  55.      *     "contact:list", "contact:read"
  56.      * })
  57.      */
  58.     protected $isClient;
  59.     /**
  60.      * @var bool
  61.      */
  62.     protected $fromForm false;
  63.     /**
  64.      * @return string
  65.      */
  66.     public function getId(): string
  67.     {
  68.         return $this->id;
  69.     }
  70.     /**
  71.      * @param string $id
  72.      *
  73.      * @return Params
  74.      */
  75.     public function setId(string $id): Params
  76.     {
  77.         $this->id $id;
  78.         return $this;
  79.     }
  80.     /**
  81.      * @return string|null
  82.      */
  83.     public function getValue(): ?string
  84.     {
  85.         return $this->value;
  86.     }
  87.     /**
  88.      * @param string|null $value
  89.      *
  90.      * @return Params
  91.      */
  92.     public function setValue(?string $value): Params
  93.     {
  94.         $this->value $value;
  95.         return $this;
  96.     }
  97.     /**
  98.      * @return string|null
  99.      */
  100.     public function getCustomerId(): ?string
  101.     {
  102.         return $this->customerId;
  103.     }
  104.     /**
  105.      * @param string|null $customerId
  106.      *
  107.      * @return Params
  108.      */
  109.     public function setCustomerId(?string $customerId): Params
  110.     {
  111.         $this->customerId $customerId;
  112.         return $this;
  113.     }
  114.     /**
  115.      * @return string|null
  116.      */
  117.     public function getOrder(): ?string
  118.     {
  119.         return $this->order;
  120.     }
  121.     /**
  122.      * @param string|null $order
  123.      *
  124.      * @return Params
  125.      */
  126.     public function setOrder(?string $order): Params
  127.     {
  128.         $this->order $order;
  129.         return $this;
  130.     }
  131.     /**
  132.      * For setting up the default value in ChoiceType in the edit form.
  133.      *
  134.      * @return string
  135.      */
  136.     public function __toString(): string
  137.     {
  138.         return $this->getId();
  139.     }
  140.     /**
  141.      * @return bool
  142.      */
  143.     public function isFromForm(): bool
  144.     {
  145.         return $this->fromForm;
  146.     }
  147.     /**
  148.      * @param bool $fromForm
  149.      *
  150.      * @return Params
  151.      */
  152.     public function setFromForm(bool $fromForm): Params
  153.     {
  154.         $this->fromForm $fromForm;
  155.         return $this;
  156.     }
  157.     /**
  158.      * @return bool|null
  159.      */
  160.     public function getIsClient(): ?bool
  161.     {
  162.         return $this->isClient;
  163.     }
  164.     /**
  165.      * @param bool|null $isClient
  166.      *
  167.      * @return Params
  168.      */
  169.     public function setIsClient(?bool $isClient): Params
  170.     {
  171.         $this->isClient $isClient;
  172.         return $this;
  173.     }
  174. }