ResourceLoader: Define targets in a single location

All the *Module classes end up inheriting from ResourceLoader/Module, so
we only need to define the targets there.

Bug: T127268
Bug: T328497
Change-Id: I12b126377cea78b88269e6efe68f92f3586c4ecc
This commit is contained in:
Kosta Harlan 2023-02-01 11:59:26 +01:00 committed by Bartosz Dziewoński
parent 95ee25aefb
commit 78916de4aa
9 changed files with 0 additions and 14 deletions

View file

@ -56,7 +56,6 @@ class ImageModule extends Module {
protected $prefix = null;
protected $selectorWithoutVariant = '.{prefix}-{name}';
protected $selectorWithVariant = '.{prefix}-{name}-{variant}';
protected $targets = [ 'desktop', 'mobile' ];
/**
* Constructs a new module from an options array.

View file

@ -31,7 +31,6 @@ use MediaWiki\MediaWikiServices;
* @internal
*/
class LanguageDataModule extends FileModule {
protected $targets = [ 'desktop', 'mobile' ];
/**
* Get all the dynamic data for the content language to an array.

View file

@ -32,7 +32,6 @@ use MediaWiki\MainConfigNames;
*/
class SiteModule extends WikiModule {
/** @var string[] What client platforms the module targets (e.g. desktop, mobile) */
protected $targets = [ 'desktop', 'mobile' ];
/**
* Get list of pages used by this module

View file

@ -31,8 +31,6 @@ use MediaWiki\MainConfigNames;
* @internal
*/
class SiteStylesModule extends WikiModule {
/** @var string[] What client platforms the module targets (e.g. desktop, mobile) */
protected $targets = [ 'desktop', 'mobile' ];
/**
* Get list of pages used by this module

View file

@ -33,10 +33,6 @@ use Wikimedia\Minify\CSSMin;
* @internal
*/
class SkinModule extends LessVarFileModule {
/**
* All skins are assumed to be compatible with mobile
*/
public $targets = [ 'desktop', 'mobile' ];
/**
* Every skin should define which features it would like to reuse for core inside a

View file

@ -46,7 +46,6 @@ use Wikimedia\RequestTimeout\TimeoutException;
* @internal
*/
class StartUpModule extends Module {
protected $targets = [ 'desktop', 'mobile' ];
private $groupIds = [
// These reserved numbers MUST start at 0 and not skip any. These are preset

View file

@ -34,7 +34,6 @@ use TitleValue;
*/
class UserModule extends WikiModule {
protected $origin = self::ORIGIN_USER_INDIVIDUAL;
protected $targets = [ 'desktop', 'mobile' ];
/**
* @param Context $context

View file

@ -39,8 +39,6 @@ class UserOptionsModule extends Module {
protected $origin = self::ORIGIN_CORE_INDIVIDUAL;
protected $targets = [ 'desktop', 'mobile' ];
/**
* @param Context $context
* @return string JavaScript code

View file

@ -35,7 +35,6 @@ use TitleValue;
class UserStylesModule extends WikiModule {
protected $origin = self::ORIGIN_USER_INDIVIDUAL;
protected $targets = [ 'desktop', 'mobile' ];
/**
* @param Context $context