protected function clearRotatorsWithBanner($banner){ $bannerInRotator = new Pap_Db_BannerInRotator(); $bannerInRotator->setRotatedBannerId($banner->getId()); Pap_Db_Table_CachedBanners::deleteCachedBannersForBanner($banner->getId()); foreach($bannerInRotator->loadCollection() as $bannerInRotatorDelete){ Pap_Db_Table_CachedBanners::deleteCachedBannersForBanner($bannerInRotatorDelete->getParentBannerId()); } }
protected function getBannerInRotatorCollection($id){ $bannerInRotator = new Pap_Db_BannerInRotator(); $bannerInRotator->setRotatedBannerId($id); $bannerInRotator->setParentBannerId($this->form->getFieldValue(Pap_Db_Table_BannersInRotators::PARENT_BANNER_ID)); return $bannerInRotator->loadCollection(array(Pap_Db_Table_BannersInRotators::ROTATED_BANNER_ID,Pap_Db_Table_BannersInRotators::PARENT_BANNER_ID)); }