mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-12-20 20:12:35 +00:00
27 lines
698 B
PHP
27 lines
698 B
PHP
<?php
|
|
|
|
use OOUI\ProgressBarWidget;
|
|
|
|
class SpecialPortableInfoboxBuilder extends SpecialPage {
|
|
public function __construct() {
|
|
$restriction = $this->getConfig()->get( 'NamespaceProtection' )[NS_TEMPLATE][0] ?? '';
|
|
parent::__construct( 'PortableInfoboxBuilder', $restriction );
|
|
}
|
|
|
|
public function execute( $par ) {
|
|
$out = $this->getOutput();
|
|
|
|
$this->setHeaders();
|
|
$out->enableOOUI();
|
|
|
|
$this->checkPermissions();
|
|
|
|
$out->addModules( [ 'ext.PortableInfobox.styles', 'ext.PortableInfoboxBuilder' ] );
|
|
$out->addHTML(
|
|
'<div id="mw-infoboxbuilder" data-title="' . str_replace( '"', '"', $par ) . '">' .
|
|
new ProgressBarWidget( [ 'progress' => false ] ) .
|
|
'</div>'
|
|
);
|
|
}
|
|
}
|