2021-12-17 18:00:14 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class SpecialPortableInfoboxBuilder extends SpecialPage {
|
|
|
|
public function __construct() {
|
2021-12-19 18:01:48 +00:00
|
|
|
$restriction = $this->getConfig()->get( 'NamespaceProtection' )[NS_TEMPLATE][0] ?? '';
|
2021-12-19 02:59:14 +00:00
|
|
|
parent::__construct( 'PortableInfoboxBuilder', $restriction );
|
2021-12-17 18:00:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function execute( $par ) {
|
|
|
|
$out = $this->getOutput();
|
|
|
|
|
|
|
|
$this->setHeaders();
|
|
|
|
$out->enableOOUI();
|
|
|
|
|
2021-12-30 22:50:10 +00:00
|
|
|
$this->checkPermissions();
|
|
|
|
|
2021-12-17 18:00:14 +00:00
|
|
|
$out->addModules( [ 'ext.PortableInfobox.styles', 'ext.PortableInfoboxBuilder' ] );
|
|
|
|
$out->addHTML(
|
|
|
|
'<div id="mw-infoboxbuilder" data-title="' . str_replace( '"', '"', $par ) . '">' .
|
|
|
|
new OOUI\ProgressBarWidget( [ 'progress' => false ] ) .
|
|
|
|
'</div>'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|