MediaWiki REL1_33
UploadSourceField.php
Go to the documentation of this file.
1<?php
25
30 function getLabelHtml( $cellAttributes = [] ) {
31 $id = $this->mParams['id'];
32 $label = Html::rawElement( 'label', [ 'for' => $id ], $this->mLabel );
33
34 if ( !empty( $this->mParams['radio'] ) ) {
35 $radioId = $this->mParams['radio-id'] ??
36 // Old way. For the benefit of extensions that do not define
37 // the 'radio-id' key.
38 'wpSourceType' . $this->mParams['upload-type'];
39
40 $attribs = [
41 'name' => 'wpSourceType',
42 'type' => 'radio',
43 'id' => $radioId,
44 'value' => $this->mParams['upload-type'],
45 ];
46
47 if ( !empty( $this->mParams['checked'] ) ) {
48 $attribs['checked'] = 'checked';
49 }
50
51 $label .= Html::element( 'input', $attribs );
52 }
53
54 return Html::rawElement( 'td', [ 'class' => 'mw-label' ] + $cellAttributes, $label );
55 }
56
60 function getSize() {
61 return $this->mParams['size'] ?? 60;
62 }
63}
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
<input> field.
A form field that contains a radio box in the label.
getLabelHtml( $cellAttributes=[])
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing & $attribs
Definition hooks.txt:2012