mediawiki-extensions-Visual.../includes/VisualEditorDesktopArticleTargetInitModule.php
James D. Forrester 31f667ccf7 doc: Document all public and protected PHP functions
Also move the maintenane script to a name that makes
MediaWiki.Files.ClassMatchesFilename.NotMatch not error,
and use the more restrictive licence tag usage for
MediaWiki.Commenting.LicenseComment.InvalidLicenseTag.

Change-Id: Ifa5518cd590ae83c6fd76f1dbb5a2ce40de4b119
2018-03-28 12:50:44 -07:00

32 lines
803 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 MIT
*/
class VisualEditorDesktopArticleTargetInitModule extends ResourceLoaderFileModule {
/**
* @inheritDoc
*/
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 );
}
}