src/Domain/Entity/View/PointOfInterestView.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Domain\Entity\View;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use ApiPlatform\Metadata\GetCollection;
  5. use DateTime;
  6. #[ApiResource(
  7.     operations: [
  8.         new GetCollection(
  9.             uriTemplate'/point_of_interests',
  10.             security"is_granted('ROLE_ADMIN')",
  11.             filters: [
  12.                 'point_of_interest_view.query_filter',
  13.                 'point_of_interest_view.main_filter',
  14.                 'point_of_interest_view.order_filter',
  15.             ],
  16.         ),
  17.     ],
  18.     normalizationContext: ['groups' => ['point_of_interest_view']],
  19. )]
  20. class PointOfInterestView
  21. {
  22.     /**
  23.      * @param bool        $certified
  24.      * @param string|null $cityName
  25.      * @param string|null $country
  26.      * @param bool        $gpsCertified
  27.      * @param string      $id
  28.      * @param bool        $main
  29.      * @param string      $name
  30.      * @param string      $uuid
  31.      * @param string|null $zipCode
  32.      * @param string|null $offerType
  33.      * @param DateTime    $createdAt
  34.      */
  35.     public function __construct(
  36.         public bool $certified,
  37.         public string null $cityName,
  38.         public string null $country,
  39.         public bool $gpsCertified,
  40.         public string $id,
  41.         public bool $main,
  42.         public string $name,
  43.         public string $uuid,
  44.         public string null $zipCode,
  45.         public bool null $isTemporaryClosed,
  46.         public string null $offerType,
  47.         public DateTime $createdAt,
  48.     ) {
  49.     }
  50. }