/**
  * function getGroupLinks
  * <pre>
  * Returns an array of links linked directly to groups this viewer is 
  * linked to.
  * </pre>
  * @param $viewerID [INTEGER] the viewer_id of the person to make a cache
  * entry for.
  * @param $languageID [INTEGER] the language_id of the cache entry 
  * @return [ARRAY]
  */
 function getGroupLinks($viewerID, $languageID)
 {
     $resultArray = array();
     // create Link RowLabelBridge
     $linkManager = new RowManager_NavBarLinksManager();
     $multiLingualContext = new MultilingualManager($languageID, 'moduleNavBar', 'navBarLinks');
     $bridgeManager = $linkManager->getRowLabelBridge($multiLingualContext);
     // add to it the LinkAccessGroup table
     $linkGroup = new RowManager_NavLinkAccessGroupManager();
     $joinPair = new JoinPair($linkGroup->getJoinOnLinkID(), $linkManager->getJoinOnLinkID());
     $bridgeManager->addRowManager($linkGroup, $joinPair);
     // add to it the ViewerAccessGroup Table
     $viewerAccessGroup = new RowManager_ViewerAccessGroupManager();
     $viewerAccessGroup->setViewerID($viewerID);
     $joinPair = new JoinPair($viewerAccessGroup->getJoinOnGroupID(), $linkGroup->getJoinOnGroupID());
     $bridgeManager->addRowManager($viewerAccessGroup, $joinPair);
     // get list of entries
     $list = $bridgeManager->getListIterator();
     // for each item
     $list->setFirst();
     while ($link = $list->getNext()) {
         // add to resultArray
         $resultArray[] = $link->getArrayOfValues();
     }
     // next item
     return $resultArray;
 }