You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
911 B
PHTML

2 years ago
<?php
namespace Isekai\Widgets;
use MediaWiki\Title\Title;
use MediaWiki\Parser\Parser;
use MediaWiki\Html\Html;
use PPFrame;
use MediaWiki\MediaWikiServices;
2 years ago
class CreatePageWidget {
public static function getHtml() {
2 years ago
ob_start();
include(dirname(__DIR__) . '/modules/createPage/ext.isekai.createPage.tpl');
$template = ob_get_clean();
return [$template, "markerType" => 'nowiki'];
}
public static function create($text, $params, Parser $parser, PPFrame $frame) {
$config = MediaWikiServices::getInstance()->getMainConfig();
$configCreatePageNamespaces = $config->get('IsekaiCreatePageNamespaces');
$parser->getOutput()->setJsConfigVar('wgIsekaiCreatePageNamespaces', $configCreatePageNamespaces);
$parser->getOutput()->addModules(['ext.isekai.createPage']);
2 years ago
return self::getHtml();
}
4 years ago
}