diff --git a/src/Kunstmaan/MediaPagePartBundle/Entity/AudioPagePart.php b/src/Kunstmaan/MediaPagePartBundle/Entity/AudioPagePart.php index 0d3ce7ee4d..30f14993c1 100644 --- a/src/Kunstmaan/MediaPagePartBundle/Entity/AudioPagePart.php +++ b/src/Kunstmaan/MediaPagePartBundle/Entity/AudioPagePart.php @@ -6,6 +6,7 @@ use Kunstmaan\MediaBundle\Entity\Media; use Kunstmaan\MediaPagePartBundle\Form\AudioPagePartAdminType; use Kunstmaan\PagePartBundle\Entity\AbstractPagePart; +use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\Entity @@ -21,6 +22,7 @@ class AudioPagePart extends AbstractPagePart */ #[ORM\ManyToOne(targetEntity: Media::class)] #[ORM\JoinColumn(name: 'media_id', referencedColumnName: 'id')] + #[Assert\NotBlank] protected $media; /** diff --git a/src/Kunstmaan/MediaPagePartBundle/Entity/DownloadPagePart.php b/src/Kunstmaan/MediaPagePartBundle/Entity/DownloadPagePart.php index 696a72bb89..87f1efacb6 100644 --- a/src/Kunstmaan/MediaPagePartBundle/Entity/DownloadPagePart.php +++ b/src/Kunstmaan/MediaPagePartBundle/Entity/DownloadPagePart.php @@ -6,6 +6,7 @@ use Kunstmaan\MediaBundle\Entity\Media; use Kunstmaan\MediaPagePartBundle\Form\DownloadPagePartAdminType; use Kunstmaan\PagePartBundle\Entity\AbstractPagePart; +use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\Entity @@ -21,6 +22,7 @@ class DownloadPagePart extends AbstractPagePart */ #[ORM\ManyToOne(targetEntity: Media::class)] #[ORM\JoinColumn(name: 'media_id', referencedColumnName: 'id')] + #[Assert\NotBlank] protected $media; /** diff --git a/src/Kunstmaan/MediaPagePartBundle/Entity/ImagePagePart.php b/src/Kunstmaan/MediaPagePartBundle/Entity/ImagePagePart.php index 686b166fa1..c16d881ac3 100644 --- a/src/Kunstmaan/MediaPagePartBundle/Entity/ImagePagePart.php +++ b/src/Kunstmaan/MediaPagePartBundle/Entity/ImagePagePart.php @@ -6,6 +6,7 @@ use Kunstmaan\MediaBundle\Entity\Media; use Kunstmaan\MediaPagePartBundle\Form\ImagePagePartAdminType; use Kunstmaan\PagePartBundle\Entity\AbstractPagePart; +use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\Entity @@ -39,6 +40,7 @@ class ImagePagePart extends AbstractPagePart */ #[ORM\ManyToOne(targetEntity: Media::class)] #[ORM\JoinColumn(name: 'media_id', referencedColumnName: 'id')] + #[Assert\NotBlank] protected $media; /** diff --git a/src/Kunstmaan/MediaPagePartBundle/Entity/SlidePagePart.php b/src/Kunstmaan/MediaPagePartBundle/Entity/SlidePagePart.php index 7ff251f370..671c019bbb 100644 --- a/src/Kunstmaan/MediaPagePartBundle/Entity/SlidePagePart.php +++ b/src/Kunstmaan/MediaPagePartBundle/Entity/SlidePagePart.php @@ -6,6 +6,7 @@ use Kunstmaan\MediaBundle\Entity\Media; use Kunstmaan\MediaPagePartBundle\Form\SlidePagePartAdminType; use Kunstmaan\PagePartBundle\Entity\AbstractPagePart; +use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\Entity @@ -21,6 +22,7 @@ class SlidePagePart extends AbstractPagePart */ #[ORM\ManyToOne(targetEntity: Media::class)] #[ORM\JoinColumn(name: 'media_id', referencedColumnName: 'id')] + #[Assert\NotBlank] protected $media; /** diff --git a/src/Kunstmaan/MediaPagePartBundle/Entity/VideoPagePart.php b/src/Kunstmaan/MediaPagePartBundle/Entity/VideoPagePart.php index 3a7de8833e..373bca4993 100644 --- a/src/Kunstmaan/MediaPagePartBundle/Entity/VideoPagePart.php +++ b/src/Kunstmaan/MediaPagePartBundle/Entity/VideoPagePart.php @@ -6,6 +6,7 @@ use Kunstmaan\MediaBundle\Entity\Media; use Kunstmaan\MediaPagePartBundle\Form\VideoPagePartAdminType; use Kunstmaan\PagePartBundle\Entity\AbstractPagePart; +use Symfony\Component\Validator\Constraints as Assert; /** * @ORM\Entity @@ -21,6 +22,7 @@ class VideoPagePart extends AbstractPagePart */ #[ORM\ManyToOne(targetEntity: Media::class)] #[ORM\JoinColumn(name: 'media_id', referencedColumnName: 'id')] + #[Assert\NotBlank] protected $media; /**