* @license MIT
*/
class CheckMatrixWidget extends \OOUI\Widget {
-
- protected $name = '';
- protected $columns = [];
- protected $rows = [];
- protected $tooltips = [];
- protected $values = [];
- protected $forcedOn = [];
- protected $forcedOff = [];
+ /** @var string|null */
+ protected $name;
+ /** @var string|null */
+ protected $id;
+ /** @var array */
+ protected $columns;
+ /** @var array */
+ protected $rows;
+ /** @var array */
+ protected $tooltips;
+ /** @var array */
+ protected $values;
+ /** @var array */
+ protected $forcedOn;
+ /** @var array */
+ protected $forcedOff;
/**
* Operates similarly to MultiSelectWidget, but instead of using an array of
* @license MIT
*/
class SelectWithInputWidget extends \OOUI\Widget {
-
- protected $textinput = null;
- protected $dropdowninput = null;
+ /** @var array */
+ protected $config;
+ /** @var TextInputWidget */
+ protected $textinput;
+ /** @var DropdownInputWidget */
+ protected $dropdowninput;
/**
* A version of the SelectWithInputWidget, with `or` set to true.
* @license MIT
*/
class SizeFilterWidget extends \OOUI\Widget {
-
- protected $radioselectinput = null;
- protected $textinput = null;
+ /** @var array */
+ protected $config;
+ /** @var LabelWidget */
+ protected $label;
+ /** @var RadioSelectInputWidget */
+ protected $radioselectinput;
+ /** @var TextInputWidget */
+ protected $textinput;
/**
* RadioSelectInputWidget and a TextInputWidget to set minimum or maximum byte size
* @license MIT
*/
abstract class TagMultiselectWidget extends \OOUI\Widget {
-
- protected $selectedArray = [];
- protected $inputName = null;
- protected $inputPlaceholder = null;
- protected $tagLimit = null;
+ /** @var array */
+ protected $selectedArray;
+ /** @var string|null */
+ protected $inputName;
+ /** @var string|null */
+ protected $inputPlaceholder;
+ /** @var array */
+ protected $input;
+ /** @var int|null */
+ protected $tagLimit;
/**
* @param array $config Configuration options
* - array $config['default'] Array of items to use as preset data
- * - array $config['name'] Name attribute (used in forms)
- * - array $config['placeholder'] Placeholder message for input
+ * - string $config['name'] Name attribute (used in forms)
+ * - string $config['placeholder'] Placeholder message for input
* - array $config['input'] Config options for the input widget
- * - number $config['tagLimit'] Maximum number of selected items
+ * - int $config['tagLimit'] Maximum number of selected items
*/
public function __construct( array $config = [] ) {
parent::__construct( $config );
// Properties
- if ( isset( $config['default'] ) ) {
- $this->selectedArray = $config['default'];
- }
- if ( isset( $config['name'] ) ) {
- $this->inputName = $config['name'];
- }
- if ( isset( $config['placeholder'] ) ) {
- $this->inputPlaceholder = $config['placeholder'];
- }
- if ( isset( $config['input'] ) ) {
- $this->input = $config['input'];
- } else {
- $this->input = [];
- }
- if ( isset( $config['tagLimit'] ) ) {
- $this->tagLimit = $config['tagLimit'];
- }
+ $this->selectedArray = $config['default'] ?? [];
+ $this->inputName = $config['name'] ?? null;
+ $this->inputPlaceholder = $config['placeholder'] ?? null;
+ $this->input = $config['input'] ?? [];
+ $this->tagLimit = $config['tagLimit'] ?? null;
$textarea = new MultilineTextInputWidget( array_merge( [
'name' => $this->inputName,