UserInputWidget.php 645 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace MediaWiki\Widget;
  3. /**
  4. * User input widget.
  5. *
  6. * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
  7. * @license MIT
  8. */
  9. class UserInputWidget extends \OOUI\TextInputWidget {
  10. /**
  11. * @param array $config Configuration options
  12. */
  13. public function __construct( array $config = [] ) {
  14. parent::__construct( $config );
  15. // Initialization
  16. $this->addClasses( [ 'mw-widget-userInputWidget' ] );
  17. }
  18. protected function getJavaScriptClassName() {
  19. return 'mw.widgets.UserInputWidget';
  20. }
  21. public function getConfig( &$config ) {
  22. $config['$overlay'] = true;
  23. return parent::getConfig( $config );
  24. }
  25. }