static function updatePageGroup($oPageGroup) { self::debug("Updating a pagegroup : #" . $oPageGroup->getId()); self::getDriver()->updatePageGroup($oPageGroup); AnwCache::clearCacheFromPageGroup($oPageGroup); }
private function notifyChanged($bClearCachedOutputForPageGroupsLinking = true) { if ($bClearCachedOutputForPageGroupsLinking) { //clear cachedoutput for linking pagegroups $aoPageGroups = $this->getPageGroup()->getPageGroupsLinking(); foreach ($aoPageGroups as $oPageGroup) { $aoPages = $oPageGroup->getPages(); foreach ($aoPages as $oPage) { AnwCache::clearCachedOutputFromPage($oPage); } } } //notify contentclass $this->getPageGroup()->getContentClass()->onChange($this, $this->oPreviousContent); //notify plugins AnwPlugins::hook('page_onchange', $this, $this->oPreviousContent); $sContentClassName = $this->getPageGroup()->getContentClass()->getName(); AnwPlugins::hook('page_onchange_byclassname_' . $sContentClassName, $this, $this->oPreviousContent); }
function onChange($oPage, $oPreviousContent = null) { $aoPagesNews = self::getNewsList($oPage); foreach ($aoPagesNews as $oPageNews) { AnwCache::clearCacheFromPageGroup($oPageNews->getPageGroup()); } }
function onChange($oPage, $oPreviousContent = null) { //clear cache from previous categories, in case of news is no more under this category if ($oPreviousContent != null) { $aoPagesCategoriesPrevious = self::getCategoriesPages($oPreviousContent, $oPage); foreach ($aoPagesCategoriesPrevious as $oPageCategory) { AnwCache::clearCacheFromPageGroup($oPageCategory->getPageGroup()); } } //clear cache from current categories, in case news was not already under these categories $aoPagesCategoriesCurrent = self::getCategoriesPages($oPage->getContent(), $oPage); foreach ($aoPagesCategoriesCurrent as $oPageCategory) { AnwCache::clearCacheFromPageGroup($oPageCategory->getPageGroup()); } }