/**
  * {@inheritdoc}
  */
 public function addGalleryHasMedias(GalleryHasMediaInterface $galleryHasMedia)
 {
     $galleryHasMedia->setGallery($this);
     // set nodename of GalleryHasMedia
     if (!$galleryHasMedia->getNodename()) {
         $galleryHasMedia->setNodename('media' . ($this->galleryHasMedias->count() + 1));
     }
     $this->galleryHasMedias->set($galleryHasMedia->getNodename(), $galleryHasMedia);
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function addGalleryHasMedias(GalleryHasMediaInterface $galleryHasMedia)
 {
     $galleryHasMedia->setGallery($this);
     $this->galleryHasMedias[] = $galleryHasMedia;
 }