X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fwidget%2FComplexTitleInputWidget.php;h=a9e80425e5f725cc993e040afa256e20b298c3fa;hb=956967415397d64f7c67259f190e8122a0b32506;hp=73ef54c848bffa9945c8fe7366b0d58dd2710815;hpb=6d79d853b17dc45b8b4796e89d930f95f75e7216;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/widget/ComplexTitleInputWidget.php b/includes/widget/ComplexTitleInputWidget.php index 73ef54c848..a9e80425e5 100644 --- a/includes/widget/ComplexTitleInputWidget.php +++ b/includes/widget/ComplexTitleInputWidget.php @@ -19,17 +19,17 @@ class ComplexTitleInputWidget extends \OOUI\Widget { * Like TitleInputWidget, but the namespace has to be input through a separate dropdown field. * * @param array $config Configuration options - * @param array $config['namespace'] Configuration for the NamespaceInputWidget dropdown with list - * of namespaces + * @param array $config['namespace'] Configuration for the NamespaceInputWidget dropdown + * 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 ); @@ -41,17 +41,17 @@ class ComplexTitleInputWidget extends \OOUI\Widget { $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, - ) + '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 ); }