Пример #1
0
 protected static function getCurrentPageNames()
 {
     $asCurrentPageNames = array();
     $sCurrentPageName = AnwActionPage::getCurrentPageName();
     if (!$sCurrentPageName) {
         // FS#144 - avoids AnwBadPageNameException
         return $asCurrentPageNames;
     }
     //allow currentPageNames even if it doesn't exist (useful for action_output)
     $asCurrentPageNames[] = $sCurrentPageName;
     try {
         $oCurrentPage = new AnwPageByName($sCurrentPageName);
         $oCurrentPage->setSkipLoadingTranslationsContent(true);
         $aoCurrentPageTranslations = $oCurrentPage->getPageGroup()->getPages($oCurrentPage);
         foreach ($aoCurrentPageTranslations as $oTranslation) {
             $asCurrentPageNames[] = $oTranslation->getName();
         }
     } catch (AnwPageNotFoundException $e) {
     }
     return $asCurrentPageNames;
 }