array(), 'title' => array(), ), $config ); // Parent constructor parent::__construct( $config ); // Properties $this->config = $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' ) ) ->appendContent( $this->namespace, $this->title ); } protected function getJavaScriptClassName() { return 'mw.widgets.ComplexTitleInputWidget'; } public function getConfig( &$config ) { $config['namespace'] = $this->config['namespace']; $config['title'] = $this->config['title']; return parent::getConfig( $config ); } }