Page MenuHomeWickedGov Phorge

HiddenInputWidget.php
No OneTemporary

Size
960 B
Referenced Files
None
Subscribers
None

HiddenInputWidget.php

<?php
namespace OOUI;
/**
* Data widget intended for creating 'hidden'-type inputs.
*/
class HiddenInputWidget extends Widget {
/**
* @var string
*/
public static $tagName = 'input';
/**
* DataWidget constructor.
*
* @param array $config Configuration options
* - string $config['value'] The data the input contains. (default: '')
* - string $config['name'] The name of the hidden input. (default: '')
*/
public function __construct( array $config ) {
// Parent constructor
parent::__construct( $config );
// Initialization
$this->setAttributes( [
'type' => 'hidden',
'value' => $config['value'] ?? '',
'name' => $config['name'] ?? '',
] );
$this->removeAttributes( [ 'aria-disabled' ] );
}
/** @inheritDoc */
public function getConfig( &$config ) {
$config['value'] = $this->getAttribute( 'value' );
$config['name'] = $this->getAttribute( 'name' );
return parent::getConfig( $config );
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, May 16, 20:52 (1 d, 7 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
c0/0e/fee47e8921d33ef2351164f9d060
Default Alt Text
HiddenInputWidget.php (960 B)

Event Timeline