mediawiki-extensions-Visual.../VisualEditorDesktopArticleTargetInitModule.php
James D. Forrester 122f49b2dd build: Bump file copyright notices for 2017
Change-Id: I3c20809e71cc0da58123e1b5f29c4f3aac945496
2017-01-03 08:58:33 -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-2017 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 );
}
}