Ejemplo n.º 1
0
 /**
  * Method that returns the top level page of the page passed as parameter.
  *
  * @param string $sectionId The page that we want to know its parent page.
  * @return string A string with the parent page, it will be null if the page
  *                doesn't have a parent page.
  */
 function getTopLevelPage($sectionId = null)
 {
     $sectionId = OA_Admin_UI::getID($sectionId);
     $oMenu = OA_Admin_Menu::singleton();
     $parentSections = $oMenu->getParentSections($sectionId);
     return count($parentSections) ? $parentSections[0]->link : '';
 }