vendor/oojs/oojs-ui/php/widgets/SearchInputWidget.php
raw| 1 | <?php |
| 2 | |
| 3 | namespace OOUI; |
| 4 | |
| 5 | /** |
| 6 | * Input widget with a text field. |
| 7 | */ |
| 8 | class SearchInputWidget extends TextInputWidget { |
| 9 | |
| 10 | /** |
| 11 | * @param array $config |
| 12 | */ |
| 13 | public function __construct( array $config = [] ) { |
| 14 | // Config initialization |
| 15 | $config = array_merge( [ |
| 16 | 'icon' => 'search', |
| 17 | ], $config ); |
| 18 | |
| 19 | // Parent constructor |
| 20 | parent::__construct( $config ); |
| 21 | } |
| 22 | |
| 23 | /** @inheritDoc */ |
| 24 | protected function getValidType( $config ) { |
| 25 | return 'search'; |
| 26 | } |
| 27 | } |