[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/htmlform/ -> HTMLInfoField.php (source)

   1  <?php
   2  
   3  /**
   4   * An information field (text blob), not a proper input.
   5   */
   6  class HTMLInfoField extends HTMLFormField {
   7  	public function __construct( $info ) {
   8          $info['nodata'] = true;
   9  
  10          parent::__construct( $info );
  11      }
  12  
  13  	public function getInputHTML( $value ) {
  14          return !empty( $this->mParams['raw'] ) ? $value : htmlspecialchars( $value );
  15      }
  16  
  17  	public function getTableRow( $value ) {
  18          if ( !empty( $this->mParams['rawrow'] ) ) {
  19              return $value;
  20          }
  21  
  22          return parent::getTableRow( $value );
  23      }
  24  
  25      /**
  26       * @param string $value
  27       * @return string
  28       * @since 1.20
  29       */
  30  	public function getDiv( $value ) {
  31          if ( !empty( $this->mParams['rawrow'] ) ) {
  32              return $value;
  33          }
  34  
  35          return parent::getDiv( $value );
  36      }
  37  
  38      /**
  39       * @param string $value
  40       * @return string
  41       * @since 1.20
  42       */
  43  	public function getRaw( $value ) {
  44          if ( !empty( $this->mParams['rawrow'] ) ) {
  45              return $value;
  46          }
  47  
  48          return parent::getRaw( $value );
  49      }
  50  
  51  	protected function needsLabel() {
  52          return false;
  53      }
  54  }


Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1