public function executeIndex()
 {
     //fb#1090
     $this->response->setVal('showMenu', $this->wg->User->isAllowed('read') && !($this->wg->IsPrivateWiki && $this->wg->User->isAnon()));
     $model = new NavigationModel();
     $this->response->setVal('wikiMenuNodes', $model->getWiki($this->request->getVal('msgName', false), $this->request->getVal('wikitext', '')));
     // report wiki nav parse errors (BugId:15240)
     $this->response->setVal('parseErrors', $model->getErrors());
 }
 /**
  * Fetches wiki navigation
  *
  * @responseParam array $navigation Wiki Navigation
  *
  * @example
  */
 public function getData()
 {
     $model = new NavigationModel();
     $nav = $model->getWiki();
     $ret = array();
     foreach ($nav as $type => $list) {
         $ret[$type] = $this->getChildren($list);
     }
     $this->setResponseData(['navigation' => $ret], ['urlFields' => 'href'], NavigationModel::CACHE_TTL);
     $errors = $model->getErrors();
     if (!empty($errors)) {
         throw new InvalidDataApiException(implode(', ', array_keys($errors)));
     }
 }