Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 3 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| HTMLSubmitField | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| skipLoadData | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| loadDataFromRequest | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\HTMLForm\Field; |
| 4 | |
| 5 | /** |
| 6 | * Add a submit button inline in the form (as opposed to |
| 7 | * HTMLForm::addButton(), which will add it at the end). |
| 8 | * |
| 9 | * @stable to extend |
| 10 | */ |
| 11 | class HTMLSubmitField extends HTMLButtonField { |
| 12 | /** @inheritDoc */ |
| 13 | protected $buttonType = 'submit'; |
| 14 | |
| 15 | /** @inheritDoc */ |
| 16 | protected $mFlags = [ 'primary', 'progressive' ]; |
| 17 | |
| 18 | /** @inheritDoc */ |
| 19 | public function skipLoadData( $request ) { |
| 20 | return !$request->getCheck( $this->mName ); |
| 21 | } |
| 22 | |
| 23 | /** @inheritDoc */ |
| 24 | public function loadDataFromRequest( $request ) { |
| 25 | return $request->getCheck( $this->mName ); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | /** @deprecated class alias since 1.42 */ |
| 30 | class_alias( HTMLSubmitField::class, 'HTMLSubmitField' ); |