mediawiki-extensions-Visual.../VisualEditorDesktopArticleTargetInitModule.php
Ed Sanders b5de6fa575 [BREAKING CHANGE] Rename (View|Mobile)PageTarget to (Desktop|Mobile)ArticleTarget
Change-Id: I6a8fa76dc4d70cc04722e30e3fea6a6112d56b40
2015-07-29 18:26:36 +01:00

29 lines
817 B
PHP

<?php
/**
* ResourceLoader module for the 'ext.visualEditor.desktopArticleTarget.init'
* module. Necessary to incorporate the VisualEditorTabMessages
* configuration setting.
*
* @file
* @ingroup Extensions
* @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
class VisualEditorDesktopArticleTargetInitModule extends ResourceLoaderFileModule {
public function __construct(
$options = array(),
$localBasePath = null,
$remoteBasePath = null
) {
$veConfig = ConfigFactory::getDefaultInstance()->makeConfig( 'visualeditor' );
$options['messages'] = array_merge(
$options['messages'],
array_filter( $veConfig->get( 'VisualEditorTabMessages' ) )
);
parent::__construct( $options, $localBasePath, $remoteBasePath );
}
}