src/Domain/Entity/Newsletter.php line 22

Open in your IDE?
  1. <?php
  2. namespace App\Domain\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use ApiPlatform\Metadata\Get;
  5. use ApiPlatform\Metadata\GetCollection;
  6. use App\Domain\Entity\Behavior\Identifiable;
  7. /**
  8.  * Class Newsletter
  9.  * @package App\Domain\Entity
  10.  */
  11. #[ApiResource(
  12.     operations            : [
  13.         new Get(),
  14.         new GetCollection(),
  15.     ],
  16.     normalizationContext  : ['groups' => ['newsletter_read']],
  17.     denormalizationContext: ['groups' => ['newsletter_write']]
  18. )]
  19. class Newsletter
  20. {
  21.     use Identifiable;
  22.     /**
  23.      * @param bool $activityValidated
  24.      * @param bool $addressValidated
  25.      * @param bool $areaCommented
  26.      * @param bool $areaValidated
  27.      * @param bool $commentReplied
  28.      * @param bool $commentValidated
  29.      * @param bool $messageReceived
  30.      * @param bool $premiumExpired
  31.      * @param bool $received
  32.      */
  33.     public function __construct(
  34.         public bool $activityValidated true,
  35.         public bool $addressValidated true,
  36.         public bool $areaCommented true,
  37.         public bool $areaValidated true,
  38.         public bool $commentReplied true,
  39.         public bool $commentValidated true,
  40.         public bool $messageReceived true,
  41.         public bool $premiumExpired true,
  42.         public bool $received true,
  43.     ) {
  44.     }
  45. }