Пример #1
0
 public function getDashboardSitemapIconSRC($page)
 {
     $ids = MultilingualSection::getIDList();
     if (in_array($page->getCollectionID(), $ids)) {
         return self::getSectionFlagIcon($page, true);
     }
 }
Пример #2
0
 /** 
  * Receives a page in a different language tree, and tries to return the corresponding page in the current language tree
  */
 public function getTranslatedPageID($page)
 {
     $db = Loader::db();
     $ids = MultilingualSection::getIDList();
     if (in_array($page->getCollectionID(), $ids)) {
         $cID = $db->GetOne('select cID from MultilingualSections where msLocale = ?', array($this->getLocale()));
         return $cID;
     }
     $mpRelationID = $db->GetOne('select mpRelationID from MultilingualPageRelations where cID = ?', array($page->getCollectionID()));
     if ($mpRelationID) {
         $cID = $db->GetOne('select cID from MultilingualPageRelations where mpRelationID = ? and mpLocale = ?', array($mpRelationID, $this->getLocale()));
         return $cID;
     }
 }