mediawiki-extensions-Visual.../SpecialVisualEditorSandbox.php

37 lines
957 B
PHP
Raw Normal View History

2011-11-28 20:28:28 +00:00
<?php
/**
* Sandbox SpecialPage for VisualEditor extension
*
* @file
* @ingroup Extensions
*/
class SpecialVisualEditorSandbox extends SpecialPage {
/* Methods */
public function __construct() {
parent::__construct( 'VisualEditorSandbox' );
}
public function execute( $par ) {
global $wgOut;
2011-12-13 02:46:31 +00:00
$wgOut->addModules( 'ext.visualEditor.special.sandbox' );
2011-11-28 20:28:28 +00:00
$this->setHeaders();
$wgOut->setPageTitle( wfMsg( 'visualeditor-sandbox-title' ) );
$modeWikitext = wfMsgHtml( 'visualeditor-tooltip-wikitext' );
$modeJson = wfMsgHtml( 'visualeditor-tooltip-json' );
$modeHtml = wfMsgHtml( 'visualeditor-tooltip-html' );
$modeRender = wfMsgHtml( 'visualeditor-tooltip-render' );
$modeHistory = wfMsgHtml( 'visualeditor-tooltip-history' );
$modeHelp = wfMsgHtml( 'visualeditor-tooltip-help' );
2011-12-13 02:46:31 +00:00
$dir = dirname( __FILE__ );
ob_start();
include( 'modules/sandbox/base.php' );
$out = ob_get_clean();
2011-11-28 20:28:28 +00:00
$wgOut->addHtml( $out );
}
}