Exemplo n.º 1
0
 public static function renderHeroTag($content, array $attributes, Parser $parser, PPFrame $frame)
 {
     $wikiData = new WikiDataModel(Title::newMainPage()->getText());
     $wikiData->setFromAttributes($attributes);
     $wikiData->storeInProps();
     return '';
 }
 /**
  * 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.º 3
0
 protected function setWikiData(WikiDataModel $wikiDataModel)
 {
     if ($this->isAllowedToEdit = $this->wg->user->isAllowed('njordeditmode')) {
         $wikiDataModel->storeInPage();
         $wikiDataModel->storeInProps();
         return true;
     } else {
         return false;
     }
 }