mediawiki-extensions-Visual.../includes/VisualEditorDesktopArticleTargetInitModule.php
James D. Forrester fa9438e5fa build: Move PHP files to expected paths
Principal code is in includes/*.php with the file named the same as the class it
contains. The maintenance script is moved to maintenance/ for clarity.

Change-Id: Icb4cdffb1bd4716e14f883d667def96671b42992
2018-02-07 12:31:08 -08:00

29 lines
812 B
PHP

<?php
/**
* ResourceLoader module for the 'ext.visualEditor.desktopArticleTarget.init'
* module. Necessary to incorporate the VisualEditorTabMessages
* configuration setting.
*
* @file
* @ingroup Extensions
* @copyright 2011-2018 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
class VisualEditorDesktopArticleTargetInitModule extends ResourceLoaderFileModule {
public function __construct(
$options = [],
$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 );
}
}