/** * @param InstagramCollection $instagramCollection * @return void */ public function setInstagramCollection(InstagramCollection $instagramcollection) { $this->instagramcollection = $instagramcollection; $this->instagramcollection->addInstagramImage($this); }
/** * Adds an InstagramImage to a Collection * * @param InstagramImage $instagramimage * @param InstagramCollection $instagramcollection * @return boolean * */ public function addInstagramImageToCollectionAction(InstagramImage $instagramimage, InstagramCollection $instagramcollection) { $success = false; if ($instagramcollection->addInstagramImage($instagramimage)) { $this->persistenceManager->update($instagramcollection); $success = true; } $this->view->assign('value', $success); }