/**
  * initialize hero module on modular main page
  * @param $mainPageTitle string
  */
 private function initHeroModule($mainPageTitle)
 {
     global $wgSitename;
     $wikiDataModel = new WikiDataModel($mainPageTitle);
     $wikiDataModel->title = $wgSitename;
     $wikiDataModel->description = $this->params['wikiDescription'];
     $wikiDataModel->storeInProps();
     $wikiDataModel->storeInPage();
 }
Exemplo n.º 2
0
 protected function setWikiData(WikiDataModel $wikiDataModel)
 {
     if ($this->isAllowedToEdit = $this->wg->user->isAllowed('njordeditmode')) {
         $wikiDataModel->storeInPage();
         $wikiDataModel->storeInProps();
         return true;
     } else {
         return false;
     }
 }