MediaWiki REL1_33
ComplexTitleInputWidget.php
Go to the documentation of this file.
1<?php
2
3namespace MediaWiki\Widget;
4
11class ComplexTitleInputWidget extends \OOUI\Widget {
12
13 protected $namespace = null;
14 protected $title = null;
15
24 public function __construct( array $config = [] ) {
25 // Configuration initialization
26 $config = array_merge(
27 [
28 'namespace' => [],
29 'title' => [],
30 ],
31 $config
32 );
33
34 parent::__construct( $config );
35
36 // Properties
37 $this->config = $config;
38 $this->namespace = new NamespaceInputWidget( $config['namespace'] );
40 $config['title'],
41 [
42 'relative' => true,
43 'namespace' => $config['namespace']['value'] ?? null,
44 ]
45 ) );
46
47 // Initialization
48 $this
49 ->addClasses( [ 'mw-widget-complexTitleInputWidget' ] )
50 ->appendContent( $this->namespace, $this->title );
51 }
52
53 protected function getJavaScriptClassName() {
54 return 'mw.widgets.ComplexTitleInputWidget';
55 }
56
57 public function getConfig( &$config ) {
58 $config['namespace'] = $this->config['namespace'];
59 $config['namespace']['dropdown']['$overlay'] = true;
60 $config['title'] = $this->config['title'];
61 $config['title']['$overlay'] = true;
62 return parent::getConfig( $config );
63 }
64}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
__construct(array $config=[])
Like TitleInputWidget, but the namespace has to be input through a separate dropdown field.
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))
title