/** * Adds an image to album * * @param Tx_Yag_Domain_Model_Item $item Item to be added to album */ public function addItem(Tx_Yag_Domain_Model_Item $item) { $this->album->addItem($item); if ($this->album->getThumb() == NULL) { $this->album->setThumb($item); } }
/** * Set this item as album thumb, if no thumbnail for album is existing * */ public function setItemAsAlbumThumbIfNotExisting() { if ($this->album->getThumb() == null) { $this->album->setThumb($this); } }