* with list of namespaces
* @param array $config['title'] Configuration for the TitleInputWidget text field
*/
- public function __construct( array $config = array() ) {
+ public function __construct( array $config = [] ) {
// Configuration initialization
$config = array_merge(
- array(
- 'namespace' => array(),
- 'title' => array(),
- ),
+ [
+ 'namespace' => [],
+ 'title' => [],
+ ],
$config
);
$this->namespace = new NamespaceInputWidget( $config['namespace'] );
$this->title = new TitleInputWidget( array_merge(
$config['title'],
- array(
- // The inner TitleInputWidget shouldn't be infusable,
- // only the ComplexTitleInputWidget itself can be.
- 'infusable' => false,
+ [
'relative' => true,
'namespace' => isset( $config['namespace']['value'] ) ?
$config['namespace']['value'] :
null,
- )
+ ]
) );
// Initialization
$this
- ->addClasses( array( 'mw-widget-complexTitleInputWidget' ) )
+ ->addClasses( [ 'mw-widget-complexTitleInputWidget' ] )
->appendContent( $this->namespace, $this->title );
}