Page MenuHomeWickedGov Phorge

HTMLLargeMultiSelectField.php
No OneTemporary

Size
856 B
Referenced Files
None
Subscribers
None

HTMLLargeMultiSelectField.php

<?php
use MediaWiki\Html\Html;
use MediaWiki\HTMLForm\Field\HTMLMultiSelectField;
use MediaWiki\Xml\Xml;
class HTMLLargeMultiSelectField extends HTMLMultiSelectField {
public function getInputHTML( $value ) {
if ( !is_array( $value ) ) {
$value = [ $value ];
}
$options = "\n";
foreach ( $this->mParams[ 'options' ] as $name => $optvalue ) {
$options .= Xml::option(
(string)$name,
$optvalue,
in_array( $optvalue, $value )
) . "\n";
}
$properties = [
'multiple' => 'multiple',
'id' => $this->mID,
'name' => "$this->mName[]",
];
if ( !empty( $this->mParams[ 'disabled' ] ) ) {
$properties[ 'disabled' ] = 'disabled';
}
if ( !empty( $this->mParams[ 'cssclass' ] ) ) {
$properties[ 'class' ] = $this->mParams[ 'cssclass' ];
}
return Html::rawElement( 'select', $properties, $options );
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Jul 3, 16:42 (4 h, 26 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
18/e3/fc16e35f7b309d58f521b3bd7d04
Default Alt Text
HTMLLargeMultiSelectField.php (856 B)

Event Timeline