<?php
namespace App\Entity;
use App\Annotation\EsUploadable;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Model\BulletPoint;
use App\Annotation\EsElasticIndex;
use App\Filter\SearchWithTagFilter;
use ApiPlatform\Core\Annotation\ApiFilter;
use App\Entity\Traits\TimestampableEntity;
use App\Repository\VideoGalleryRepository;
use Doctrine\Common\Collections\Collection;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Entity\Interfaces\UploadMappedInterface;
use Doctrine\Common\Collections\ArrayCollection;
use App\Entity\Interfaces\ElasticMappedInterface;
use App\Entity\Interfaces\ContainerMappedInterface;
use App\Entity\Interfaces\NewsfeedCreatorInterface;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Serializer\Annotation\SerializedName;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\OrderFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\BooleanFilter;
use Locastic\ApiPlatformTranslationBundle\Model\AbstractTranslatable;
use Locastic\ApiPlatformTranslationBundle\Model\TranslationInterface;
/**
* @ApiResource(
* attributes={"security"="is_granted('ROLE_OPERATOR')", "filters"={"translation.groups"}},
* normalizationContext={"groups"={"VideoGallery:Read", "TZ:Read"}, "skip_null_values"=false},
* denormalizationContext={"groups"={"VideoGallery:Write", "VideoGalleryTranslationsGroup"}},
* collectionOperations={
* "get",
* "get_public"={
* "path"="/video-galleries/get-public",
* "method"="GET",
* "normalization_context"={"groups"={"VideoGallery:Read-Public", "TZ:Read"}, "skip_null_values"=false},
* "security"="is_granted('IS_AUTHENTICATED_FULLY')",
* "pagination_enabled"=false
* },
* "get_for_public_page"={
* "route_name"="api_pub_video_galleries_get_for_public_page_collection",
* "method"="GET",
* "security"="is_granted('PUBLIC_ACCESS')",
* "normalization_context"={"groups"={"VideoGallery:PRead"}, "skip_null_values"=false},
* "pagination_enabled"=true
* },
* "get_top"={
* "path"="/video-galleries/get-top",
* "method"="GET",
* "normalization_context"={"groups"={"VideoGallery:Read-Public", "TZ:Read"}, "skip_null_values"=false},
* "security"="is_granted('IS_AUTHENTICATED_FULLY')"
* },
* "get_my_history"={
* "path"="/video-galleries/get-my-history",
* "method"="GET",
* "normalization_context"={"groups"={"VideoGallery:Read-Public", "TZ:Read"}, "skip_null_values"=false},
* "security"="is_granted('IS_AUTHENTICATED_FULLY')"
* },
* "get_my_favorite"={
* "path"="/video-galleries/get-my-favorite",
* "method"="GET",
* "normalization_context"={"groups"={"VideoGallery:Read-Public", "TZ:Read"}, "skip_null_values"=false},
* "security"="is_granted('IS_AUTHENTICATED_FULLY')"
* },
* "post",
* "post_source"={
* "path"="/video-galleries/from-source",
* "method"="POST",
* "denormalization_context"={"groups"={"VideoGallery:From-Source"}}
* }
* },
* itemOperations={
* "get"={"security"="is_granted('IS_CO_OPR', object)"},
* "get_show"={
* "path"="/video-galleries/{id}/get-show",
* "method"="GET",
* "normalization_context"={"groups"={"VideoGallery:Read-Public", "TZ:Read"}, "skip_null_values"=false},
* "security"="is_granted('IS_AUTHENTICATED_FULLY')"
* },
* "put"={"security"="is_granted('IS_CO_OPR', object)"},
* "patch"={"security"="is_granted('IS_CO_OPR', object)"},
* "delete"={"security"="is_granted('IS_CO_OPR', object)"}
* }
* )
* @ApiFilter(SearchFilter::class, properties={"id": "exact", "container.id": "exact", "videoGalleryCategory.id": "exact", "translations.title": "partial", "videoGalleryTags.id": "exact", "type": "exact", "typeId": "exact", "videoGalleryTags.id", "exact", "videoGalleryHistories.user.id", "exact", "videoGalleryFavorites.user.id", "exact", "speakers.id", "exact", "moderators.id", "exact"})
* @ApiFilter(SearchWithTagFilter::class, properties={"search_with_tag": "partial"})
* @ApiFilter(BooleanFilter::class, properties={"isActive"})
* @ApiFilter(OrderFilter::class, properties={"id": "DESC", "translations.title", "videoGalleryCategory.ord"})
* @ORM\Entity(repositoryClass=VideoGalleryRepository::class)
* @EsElasticIndex("VideoGallery:EL")
*/
class VideoGallery extends AbstractTranslatable implements ContainerMappedInterface, UploadMappedInterface, NewsfeedCreatorInterface, ElasticMappedInterface
{
/**
* Hook timestampable behavior
* updates createdAt, updatedAt fields
*/
use TimestampableEntity;
/**
* @ORM\OneToMany(targetEntity="VideoGalleryTranslation", mappedBy="translatable", fetch="EXTRA_LAZY", indexBy="locale", cascade={"PERSIST"}, orphanRemoval=true)
*
* @Groups({"VideoGallery:EL", "VideoGallery:Write", "VideoGalleryTranslationsGroup", "VideoGallery:PRead"})
* @Assert\Valid()
*/
protected $translations;
/**
* @Groups({"VideoGallery:Read", "VideoGallery:PRead", "VideoGallery:Read-Public", "VideoGalleryHistory:Read", "Session:GetItem", "ElTask:Detail", "ElLession:Detail"})
*/
private $title;
/**
* @Groups({"VideoGallery:Read", "VideoGallery:PRead", "VideoGallery:Read-Public"})
*/
private $description;
/**
* @Groups({"VideoGallery:Read", "VideoGallery:PRead", "VideoGallery:Read-Public"})
*/
private $streamUrl;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"VideoGallery:EL", "VideoGallery:Read", "VideoGallery:PRead", "VideoGallery:Read-Public", "VideoGalleryHistory:Read", "Session:GetItem", "ElTask:Detail", "ElLession:Detail"})
*/
private $id;
/**
* @ORM\Column(type="string", length=32)
* @Groups({"VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:Write", "VideoGallery:From-Source"})
* @Assert\NotBlank(message="validation.videoGallery:end.notBlank")
*/
private $type;
public const VIDEOGALLERYTYPE_UPLOAD = "UPLOAD";
public const VIDEOGALLERYTYPE_SESSION = "SESSION";
public const VIDEOGALLERYTYPE_TASK = "TASK";
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:Write", "VideoGallery:From-Source"})
*/
private $typeId;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"VideoGallery:EL", "VideoGallery:Read", "VideoGallery:PRead", "VideoGallery:Read-Public", "VideoGallery:Write"})
* @Assert\Length(max=255, maxMessage="validation.videoGallery:imageName.max")
* @EsUploadable()
*/
protected $videoFileName;
/**
* @ORM\Column(type="json", nullable=true)
* @Groups({"VideoGallery:Read", "VideoGallery:PRead", "VideoGallery:Read-Public", "VideoGallery:Write"})
*/
private $metadata = [];
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:Write", "VideoGallery:From-Source"})
*/
private $isActive;
/**
* @ORM\ManyToOne(targetEntity=CommonCategory::class)
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
* @Groups({"VideoGallery:Read", "VideoGallery:PRead", "VideoGallery:Read-Public", "VideoGallery:Write", "VideoGallery:From-Source", "Session:GetItem", "ElTask:Detail", "ElLession:Detail"})
*/
private $videoGalleryCategory;
/**
* @ORM\ManyToMany(targetEntity=UserGroup::class)
* @Groups({"VideoGallery:Read", "VideoGallery:Write"})
*/
private $userGroups;
/**
* @ORM\ManyToMany(targetEntity=User::class)
* @ORM\JoinTable(name="rel_video_gallery_speaker")
* @ORM\OrderBy({"lastName" = "ASC"})
* @Groups({"VideoGallery:EL", "VideoGallery:Read", "VideoGallery:PRead", "VideoGallery:Read-Public", "VideoGallery:Write"})
*/
private $speakers;
/**
* @ORM\ManyToMany(targetEntity=User::class)
* @ORM\JoinTable(name="rel_video_gallery_moderators")
* @ORM\OrderBy({"lastName" = "ASC"})
* @Groups({"VideoGallery:EL", "VideoGallery:Read", "VideoGallery:PRead", "VideoGallery:Read-Public", "VideoGallery:Write"})
*/
private $moderators;
/**
* @ORM\ManyToOne(targetEntity=Container::class)
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
* @Groups({"VideoGallery:Write", "VideoGallery:PRead"})
*/
private $container;
/**
* @ORM\ManyToMany(targetEntity=VideoGalleryTag::class, inversedBy="videoGalleries", cascade={"persist"})
* @Groups({"VideoGallery:Read", "VideoGallery:PRead", "VideoGallery:Read-Public", "VideoGallery:Write"})
*/
private $videoGalleryTags;
/**
* @ORM\OneToMany(targetEntity=VideoGalleryHistory::class, mappedBy="videoGallery")
*/
private $videoGalleryHistories;
/**
* @ORM\OneToMany(targetEntity=VideoGalleryFavorite::class, mappedBy="videoGallery")
*/
private $videoGalleryFavorites;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"VideoGallery:EL", "VideoGallery:Read", "VideoGallery:PRead", "VideoGallery:Read-Public", "VideoGallery:Write"})
* @EsUploadable()
*/
protected $imageName;
/**
* @ORM\Column(type="string", length=32, nullable=true)
* @Groups({"VideoGallery:EL", "VideoGallery:Read", "VideoGallery:PRead", "VideoGallery:Read-Public", "VideoGallery:Write"})
*/
private $streamType;
public const STREAMTYPE_YOUTUBE = "YOUTUBE";
public const STREAMTYPE_VIMEO = "VIMEO";
public const STREAMTYPE_SWISSCOM = "SWISSCOM";
public const STREAMTYPE_DACAST = "DACAST";
public const STREAMTYPE_KNOVIO = "KNOVIO";
public const STREAMTYPE_ZOOM = "ZOOM";
public const STREAMTYPE_WEBEX = "WEBEX";
public const STREAMTYPE_FILE = "FILE";
public const STREAMTYPE_EXPERTSHARE = "EXPERTSHARE";
public const STREAMTYPE_QUMU = "QUMU";
/**
* @ORM\Column(type="integer", nullable=true)
* @Groups({"VideoGallery:EL", "VideoGallery:Read", "VideoGallery:PRead", "VideoGallery:Read-Public"})
*/
private $totalViews;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"VideoGallery:EL", "VideoGallery:Read", "VideoGallery:PRead", "VideoGallery:Read-Public"})
*/
private $isTop;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"VideoGallery:Read", "VideoGallery:Read-Public", "VideoGallery:Write"})
*/
private $isShowPublic;
/**
* @ORM\OneToMany(targetEntity=CommonComment::class, mappedBy="videoGallery")
*/
private $commonComments;
/**
* @ORM\OneToMany(targetEntity=VideoGalleryChapter::class, mappedBy="videoGallery", orphanRemoval=true)
* @Groups({"VideoGallery:Read-Public"})
*/
private $videoGalleryChapters;
/**
* @ORM\OneToMany(targetEntity=VideoGalleryDoc::class, mappedBy="videoGallery", orphanRemoval=true, cascade={"persist"})
*
* @Groups({"VideoGallery:Read", "VideoGallery:Write", "VideoGallery:Read-Public"})
*/
private $videoGalleryDocs;
/**
* @ORM\Column(type="array", nullable=true)
*
* @Groups({"VideoGallery:EL", "VideoGallery:Read", "VideoGallery:Write", "VideoGallery:Read-Public"})
*/
private $bulletPoints = [];
/**
* @ORM\Column(type="boolean", nullable=true)
*
* @Groups({"VideoGallery:Read", "VideoGallery:Write", "VideoGallery:Read-Public"})
*/
private $isCommentEnable = true;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"VideoGallery:EL", "VideoGallery:Read", "VideoGallery:Write", "VideoGallery:Read-Public"})
*/
private $isDownload;
public function __construct()
{
parent::__construct();
$this->userGroups = new ArrayCollection();
$this->speakers = new ArrayCollection();
$this->moderators = new ArrayCollection();
$this->videoGalleryTags = new ArrayCollection();
$this->commonComments = new ArrayCollection();
$this->videoGalleryChapters = new ArrayCollection();
$this->videoGalleryDocs = new ArrayCollection();
$bulletPointModel = new BulletPoint();
$this->bulletPoints = $bulletPointModel->getProperties();
}
protected function createTranslation(): TranslationInterface
{
return new VideoGalleryTranslation();
}
public function addTranslation(TranslationInterface $translation): void
{
$this->setUpdatedAt(new \DateTime());
parent::addTranslation($translation);
}
public function getTitle(): ?string
{
return $this->getTranslation()->getTitle();
}
public function setTitle(string $title): self
{
$this->getTranslation()->setTitle($title);
return $this;
}
public function getDescription(): ?string
{
return $this->getTranslation()->getDescription();
}
public function setDescription(string $description): self
{
$this->getTranslation()->setDescription($description);
return $this;
}
public function getStreamUrl(): ?string
{
return $this->getTranslation()->getStreamUrl();
}
public function setStreamUrl(string $streamUrl): self
{
$this->getTranslation()->setStreamUrl($streamUrl);
return $this;
}
public function getId(): ?int
{
return $this->id;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
public function getVideoFileName(): ?string
{
return $this->videoFileName;
}
public function setVideoFileName(?string $videoFileName): self
{
$this->videoFileName = $videoFileName;
return $this;
}
public function getMetadata(): ?array
{
return $this->metadata;
}
public function setMetadata(?array $metadata): self
{
$this->metadata = $metadata;
return $this;
}
public function getTypeId(): ?int
{
return $this->typeId;
}
public function setTypeId(?int $typeId): self
{
$this->typeId = $typeId;
return $this;
}
public function getIsActive(): ?bool
{
return $this->isActive;
}
public function setIsActive(?bool $isActive): self
{
$this->isActive = $isActive;
return $this;
}
public function getVideoGalleryCategory(): ?CommonCategory
{
return $this->videoGalleryCategory;
}
public function setVideoGalleryCategory(?CommonCategory $videoGalleryCategory): self
{
$this->videoGalleryCategory = $videoGalleryCategory;
return $this;
}
/**
* @return Collection|UserGroup[]
*/
public function getUserGroups(): Collection
{
return $this->userGroups;
}
/**
* @Groups({"VideoGallery:EL"})
* @SerializedName("groups")
*/
public function getUserGroupsArray()
{
$groups = [];
foreach ($this->userGroups as $group) {
if (!$group->getIsGenerated()) {
$groups[] = $group->getId();
}
}
return $groups;
}
public function addUserGroup(UserGroup $userGroup): self
{
if (!$this->userGroups->contains($userGroup)) {
$this->userGroups[] = $userGroup;
}
return $this;
}
public function removeUserGroup(UserGroup $userGroup): self
{
$this->userGroups->removeElement($userGroup);
return $this;
}
public function removeAllUserGroups(): self
{
foreach ($this->userGroups as $userGroup) {
$this->removeUserGroup($userGroup);
}
return $this;
}
/**
* @return Collection|User[]
*/
public function getSpeakers(): Collection
{
return $this->speakers;
}
public function addSpeaker(User $speaker): self
{
if (!$this->speakers->contains($speaker)) {
$this->speakers[] = $speaker;
}
return $this;
}
public function removeSpeaker(User $speaker): self
{
$this->speakers->removeElement($speaker);
return $this;
}
public function removeAllSpeakers(): self
{
$speakers = $this->getSpeakers();
foreach ($speakers as $speaker) {
$this->removeSpeaker($speaker);
}
return $this;
}
/**
* @return Collection|User[]
*/
public function getModerators(): Collection
{
return $this->moderators;
}
public function addModerator(User $moderator): self
{
if (!$this->moderators->contains($moderator)) {
$this->moderators[] = $moderator;
}
return $this;
}
public function removeModerator(User $moderator): self
{
$this->moderators->removeElement($moderator);
return $this;
}
public function removeAllModerators(): self
{
foreach ($this->moderators as $moderator) {
$this->removeModerator($moderator);
}
return $this;
}
public function getContainer(): ?Container
{
return $this->container;
}
public function setContainer(?Container $container): self
{
$this->container = $container;
return $this;
}
/**
* @return Collection|VideoGalleryTag[]
*/
public function getVideoGalleryTags(): Collection
{
return $this->videoGalleryTags;
}
/**
* @Groups({"VideoGallery:EL"})
* @SerializedName("tags")
*/
public function getTagsArray()
{
$tags = [];
foreach ($this->videoGalleryTags as $tag) {
$tags[] = $tag->getName();
}
return $tags;
}
public function addVideoGalleryTag(VideoGalleryTag $videoGalleryTag): self
{
if (!$this->videoGalleryTags->contains($videoGalleryTag)) {
$this->videoGalleryTags[] = $videoGalleryTag;
}
return $this;
}
public function removeVideoGalleryTag(VideoGalleryTag $videoGalleryTag): self
{
$this->videoGalleryTags->removeElement($videoGalleryTag);
return $this;
}
public function reAttachTags(): self
{
$tags = $this->videoGalleryTags;
foreach ($tags as $tag) {
$nt = clone $tag;
$nt->setContainer($this->getContainer());
$this->removeVideoGalleryTag($tag);
$this->addVideoGalleryTag($nt);
}
return $this;
}
/**
* @return Collection|VideoGalleryHistory[]
*/
public function getVideoGalleryHistories(): Collection
{
return $this->videoGalleyHistories;
}
public function addVideoGalleryHistory(VideoGalleryHistory $videoGalleryHistory): self
{
if (!$this->videoGalleyHistories->contains($videoGalleryHistory)) {
$this->videoGalleyHistories[] = $videoGalleryHistory;
$videoGalleryHistory->setVideoGallery($this);
}
return $this;
}
public function removeVideoGalleryHistory(VideoGalleryHistory $videoGalleryHistory): self
{
if ($this->videoGalleyHistories->removeElement($videoGalleryHistory)) {
// set the owning side to null (unless already changed)
if ($videoGalleryHistory->getVideoGallery() === $this) {
$videoGalleryHistory->setVideoGallery(null);
}
}
return $this;
}
/**
* @return Collection|VideoGalleryFavorite[]
*/
public function getVideoGalleryFavorites(): Collection
{
return $this->videoGalleryFavorites;
}
public function addVideoGalleryFavorite(VideoGalleryFavorite $videoGalleryFavorite): self
{
if (!$this->videoGalleryFavorites->contains($videoGalleryFavorite)) {
$this->videoGalleryFavorites[] = $videoGalleryFavorite;
$videoGalleryFavorite->setVideoGallery($this);
}
return $this;
}
public function removeVideoGalleryFavorite(VideoGalleryFavorite $videoGalleryFavorite): self
{
if ($this->videoGalleryFavorites->removeElement($videoGalleryFavorite)) {
// set the owning side to null (unless already changed)
if ($videoGalleryFavorite->getVideoGallery() === $this) {
$videoGalleryFavorite->setVideoGallery(null);
}
}
return $this;
}
public function getImageName(): ?string
{
return $this->imageName;
}
public function setImageName(?string $imageName): self
{
$this->imageName = $imageName;
return $this;
}
public function getStreamType(): ?string
{
return $this->streamType;
}
public function setStreamType(?string $streamType): self
{
$this->streamType = $streamType;
return $this;
}
public function getTotalViews(): ?int
{
return $this->totalViews;
}
public function setTotalViews(?int $totalViews): self
{
$this->totalViews = $totalViews;
return $this;
}
public function getIsTop(): ?bool
{
return $this->isTop;
}
public function setIsTop(?bool $isTop): self
{
$this->isTop = $isTop;
return $this;
}
public function getIsShowPublic(): ?bool
{
return $this->isShowPublic;
}
public function setIsShowPublic(?bool $isShowPublic): self
{
$this->isShowPublic = $isShowPublic;
return $this;
}
public function getIsPostEnable()
{
return true;
}
public function getPostPoster()
{
return $this->getImageName();
}
public function getMetadataTranslation()
{
$translations = [];
foreach ($this->getTranslations() as $translation) {
$translations[] = [
$translation->getLocale() => [
'title' => $translation->getTitle(),
'description' => $translation->getDescription(),
'streamUrl' => $translation->getStreamUrl()
]
];
}
return $translations;
}
public function getPostMetadata()
{
$speakers = [];
foreach ($this->getSpeakers() as $a) {
$speakers[] = $a->getMetadata();
}
return [
'videoGallery' => [
'id' => $this->getId(),
'translations' => $this->getMetadataTranslation(),
'type' => $this->getType(),
'typeId' => $this->getTypeId(),
'videoFileName' => $this->getVideoFileName(),
'metadata' => $this->getMetadata(),
'tags' => $this->getTagsArray(),
'videoGalleryCategory' => $this->getVideoGalleryCategory() ? $this->getVideoGalleryCategory()->getMeta() : null,
'speakers' => $speakers
]
];
}
public function getPostUserGroups()
{
return $this->getUserGroups();
}
public function getPostSubSource()
{
return Newsfeed::POSTSUBTYPE_VIDEOGALLERY;
}
public function getPostText()
{
$postText = [];
foreach ($this->getTranslations() as $translation) {
$postText[] = $translation->getTitle();
}
return implode('###', $postText);
}
public function getPostSource()
{
return CommonComment::SOURCE_VIDEOGALLERY;
}
/**
* @return Collection<int, CommonComment>
*/
public function getCommonComments(): Collection
{
return $this->commonComments;
}
public function addCommonComment(CommonComment $commonComment): self
{
if (!$this->commonComments->contains($commonComment)) {
$this->commonComments[] = $commonComment;
$commonComment->setVideoGallery($this);
}
return $this;
}
public function removeCommonComment(CommonComment $commonComment): self
{
if ($this->commonComments->removeElement($commonComment)) {
// set the owning side to null (unless already changed)
if ($commonComment->getVideoGallery() === $this) {
$commonComment->setVideoGallery(null);
}
}
return $this;
}
/**
* @return Collection<int, VideoGalleryChapter>
*/
public function getVideoGalleryChapters(): Collection
{
return $this->videoGalleryChapters;
}
public function addVideoGalleryChapter(VideoGalleryChapter $videoGalleryChapter): self
{
if (!$this->videoGalleryChapters->contains($videoGalleryChapter)) {
$this->videoGalleryChapters[] = $videoGalleryChapter;
$videoGalleryChapter->setVideoGallery($this);
}
return $this;
}
public function removeVideoGalleryChapter(VideoGalleryChapter $videoGalleryChapter): self
{
if ($this->videoGalleryChapters->removeElement($videoGalleryChapter)) {
// set the owning side to null (unless already changed)
if ($videoGalleryChapter->getVideoGallery() === $this) {
$videoGalleryChapter->setVideoGallery(null);
}
}
return $this;
}
/**
* @return Collection|VideoGalleryDoc[]
*/
public function getVideoGalleryDocs(): Collection
{
return $this->videoGalleryDocs;
}
public function addVideoGalleryDoc(VideoGalleryDoc $videoGalleryDoc): self
{
if (!$this->videoGalleryDocs->contains($videoGalleryDoc)) {
$this->videoGalleryDocs[] = $videoGalleryDoc;
$videoGalleryDoc->setVideoGallery($this);
}
return $this;
}
public function removeVideoGalleryDoc(VideoGalleryDoc $videoGalleryDoc): self
{
if ($this->videoGalleryDocs->removeElement($videoGalleryDoc)) {
// set the owning side to null (unless already changed)
if ($videoGalleryDoc->getVideoGallery() === $this) {
$videoGalleryDoc->setVideoGallery(null);
}
}
return $this;
}
public function getBulletPoints(): ?array
{
if ($this->bulletPoints === null) {
$this->bulletPoints = [];
}
return $this->bulletPoints;
}
public function setBulletPoints(?array $bulletPoints): self
{
if (!is_array($bulletPoints)) {
return $this;
}
$this->bulletPoints = $bulletPoints;
return $this;
}
public function getIsCommentEnable(): ?bool
{
return $this->isCommentEnable;
}
public function setIsCommentEnable(?bool $isCommentEnable): self
{
$this->isCommentEnable = $isCommentEnable;
return $this;
}
public function isIsDownload(): ?bool
{
return $this->isDownload;
}
public function setIsDownload(?bool $isDownload): self
{
$this->isDownload = $isDownload;
return $this;
}
/**
* @Groups({"VideoGallery:EL"})
*/
public function getCntId()
{
return $this->container->getId();
}
/**
* @Groups({"VideoGallery:EL"})
*/
public function getCategory()
{
return $this->getVideoGalleryCategory();
}
/**
* @Groups({"VideoGallery:EL"})
*/
public function getCreated()
{
return $this->getCreatedAt();
}
}