Localisation updates from https://translatewiki.net.
[mediawiki.git] / includes / htmlform / HTMLFormFieldRequiredOptionsException.php
blob62b3d3c1e8839a1cea071956ac1d7761ecdcf15b
1 <?php
3 namespace MediaWiki\HTMLForm;
5 use InvalidArgumentException;
7 /**
8 * @newable
9 * @stable to extend
11 class HTMLFormFieldRequiredOptionsException extends InvalidArgumentException {
13 /**
14 * @stable to call
16 * @param HTMLFormField $field
17 * @param array $missing
19 public function __construct( HTMLFormField $field, array $missing ) {
20 parent::__construct( sprintf( "Form type `%s` expected the following parameters to be set: %s",
21 get_class( $field ),
22 implode( ', ', $missing ) ) );
26 /** @deprecated class alias since 1.42 */
27 class_alias( HTMLFormFieldRequiredOptionsException::class, 'HTMLFormFieldRequiredOptionsException' );