コード例 #1
0
ファイル: class_storage.php プロジェクト: MenZil-Team/anwiki
 static function updatePageGroup($oPageGroup)
 {
     self::debug("Updating a pagegroup : #" . $oPageGroup->getId());
     self::getDriver()->updatePageGroup($oPageGroup);
     AnwCache::clearCacheFromPageGroup($oPageGroup);
 }
コード例 #2
0
ファイル: class_page.php プロジェクト: MenZil-Team/anwiki
 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);
 }
コード例 #3
0
 function onChange($oPage, $oPreviousContent = null)
 {
     $aoPagesNews = self::getNewsList($oPage);
     foreach ($aoPagesNews as $oPageNews) {
         AnwCache::clearCacheFromPageGroup($oPageNews->getPageGroup());
     }
 }
コード例 #4
0
 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());
     }
 }