Skip to content

Commit

Permalink
Merge pull request #3456 from insiders/media-constraint
Browse files Browse the repository at this point in the history
[MediaPagePartBundle] Add missing notblank constraint to media pageparts
  • Loading branch information
acrobat authored Nov 1, 2024
2 parents 6542e9f + 8661562 commit ccdcc42
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Kunstmaan/MediaPagePartBundle/Entity/AudioPagePart.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,6 +22,7 @@ class AudioPagePart extends AbstractPagePart
*/
#[ORM\ManyToOne(targetEntity: Media::class)]
#[ORM\JoinColumn(name: 'media_id', referencedColumnName: 'id')]
#[Assert\NotBlank]
protected $media;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/Kunstmaan/MediaPagePartBundle/Entity/DownloadPagePart.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,6 +22,7 @@ class DownloadPagePart extends AbstractPagePart
*/
#[ORM\ManyToOne(targetEntity: Media::class)]
#[ORM\JoinColumn(name: 'media_id', referencedColumnName: 'id')]
#[Assert\NotBlank]
protected $media;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/Kunstmaan/MediaPagePartBundle/Entity/ImagePagePart.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -39,6 +40,7 @@ class ImagePagePart extends AbstractPagePart
*/
#[ORM\ManyToOne(targetEntity: Media::class)]
#[ORM\JoinColumn(name: 'media_id', referencedColumnName: 'id')]
#[Assert\NotBlank]
protected $media;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/Kunstmaan/MediaPagePartBundle/Entity/SlidePagePart.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,6 +22,7 @@ class SlidePagePart extends AbstractPagePart
*/
#[ORM\ManyToOne(targetEntity: Media::class)]
#[ORM\JoinColumn(name: 'media_id', referencedColumnName: 'id')]
#[Assert\NotBlank]
protected $media;

/**
Expand Down
2 changes: 2 additions & 0 deletions src/Kunstmaan/MediaPagePartBundle/Entity/VideoPagePart.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,6 +22,7 @@ class VideoPagePart extends AbstractPagePart
*/
#[ORM\ManyToOne(targetEntity: Media::class)]
#[ORM\JoinColumn(name: 'media_id', referencedColumnName: 'id')]
#[Assert\NotBlank]
protected $media;

/**
Expand Down

0 comments on commit ccdcc42

Please sign in to comment.