MediaWiki
REL1_24
|
00001 <?php 00002 00003 class HTMLHiddenField extends HTMLFormField { 00004 public function __construct( $params ) { 00005 parent::__construct( $params ); 00006 00007 # Per HTML5 spec, hidden fields cannot be 'required' 00008 # http://www.w3.org/TR/html5/forms.html#hidden-state-%28type=hidden%29 00009 unset( $this->mParams['required'] ); 00010 } 00011 00012 public function getTableRow( $value ) { 00013 $params = array(); 00014 if ( $this->mID ) { 00015 $params['id'] = $this->mID; 00016 } 00017 00018 $this->mParent->addHiddenField( $this->mName, $this->mDefault, $params ); 00019 00020 return ''; 00021 } 00022 00028 public function getDiv( $value ) { 00029 return $this->getTableRow( $value ); 00030 } 00031 00037 public function getRaw( $value ) { 00038 return $this->getTableRow( $value ); 00039 } 00040 00041 public function getInputHTML( $value ) { 00042 return ''; 00043 } 00044 }