コード例 #1
0
ファイル: DataHandler.php プロジェクト: dmitryd/typo3-realurl
 /**
  * Clears path and URL caches if the page was deleted.
  *
  * @param string $table
  * @param string|int $id
  */
 public function processCmdmap_deleteAction($table, $id)
 {
     if (($table === 'pages' || $table === 'pages_language_overlay') && MathUtility::canBeInterpretedAsInteger($id)) {
         $this->cache->clearPathCacheForPage((int) $id);
         $this->cache->clearUrlCacheForPage((int) $id);
         $this->clearUrlCacheForAliasChanges($table, (int) $id);
     }
 }
コード例 #2
0
ファイル: DataHandler.php プロジェクト: MaxServ/typo3-realurl
 /**
  * Expires path cache fo the page and subpages.
  *
  * @param int $pageId
  * @param int $languageId
  * @return void
  */
 protected function expireCachesForPageAndSubpages($pageId, $languageId)
 {
     $this->cache->expirePathCache($pageId, $languageId);
     $this->cache->clearUrlCacheForPage($pageId);
     $subpages = BackendUtility::getRecordsByField('pages', 'pid', $pageId);
     $uidList = array();
     foreach ($subpages as $subpage) {
         $uidList[] = (int) $subpage['uid'];
     }
     unset($subpages);
     foreach ($uidList as $uid) {
         $this->cache->expirePathCache($uid, $languageId);
         $this->expireCachesForPageAndSubpages($uid, $languageId);
     }
 }