MediaWiki  REL1_23
HTMLHiddenField.php
Go to the documentation of this file.
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://dev.w3.org/html5/spec/states-of-the-type-attribute.html#hidden-state
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 
00026     public function getDiv( $value ) {
00027         return $this->getTableRow( $value );
00028     }
00029 
00033     public function getRaw( $value ) {
00034         return $this->getTableRow( $value );
00035     }
00036 
00037     public function getInputHTML( $value ) {
00038         return '';
00039     }
00040 }