Item
[ class tree: Item ] [ index: Item ] [ all elements ]

Source for file Input.php

Documentation is available at Input.php

  1. <?php
  2. /**
  3.  * Formagic
  4.  *
  5.  * LICENCE
  6.  *
  7.  * This source file is subject to the new BSD license that is bundled
  8.  * with this package in the file LICENSE.txt.
  9.  * It is also available through the world-wide-web at
  10.  * http://formagic.weasle.de/licence.txt
  11.  * If you did not receive a copy of the license and are unable to
  12.  * obtain it through the world-wide-web, please send an email
  13.  * to licence@weasle.de so we can send you a copy immediately.
  14.  *
  15.  * @category    Formagic
  16.  * @package     Item
  17.  * @author      Florian Sonnenburg
  18.  * @copyright   Copyright (c) 2007 Florian Sonnenburg
  19.  * @license     http://formagic.weasle.de/licence.txt     New BSD License
  20.  * @revision    $Revision: 11 $
  21.  */
  22.  
  23. /**
  24.  * Formagic_Item_Input
  25.  *
  26.  * @category    Formagic
  27.  * @package     Item
  28.  * @author      Florian Sonnenburg
  29.  * @copyright   Copyright (c) 2007
  30.  * @version     $Id: Input.php 11 2007-08-12 20:02:57Z meweasle $
  31.  */
  32. {
  33.  
  34.     /**
  35.      * HTML string representation of text input field
  36.      *
  37.      * @return string 
  38.      */
  39.     public function getHtml()
  40.     {
  41.         $val $this->getValue();
  42.  
  43.         if ($this->_isBlocked{
  44.             $str $val;
  45.             if ($this->isPostItem{
  46.                 $str .= '<input type="hidden" id="' $this->id . '" name="' .
  47.                                       $this->name . '" value="' $val '" />';
  48.             }
  49.         else {
  50.             $this->attributes['type''text';
  51.             $this->attributes['name'$this->name;
  52.             $this->attributes['id'$this->id;
  53.             $this->attributes['value'$val;
  54.             $str '<input' $this->_getAttributeStr(' />';
  55.         }
  56.         return $str;
  57.     }
  58.  
  59. }

Documentation generated on Thu, 23 Aug 2007 00:29:41 +0200 by phpDocumentor 1.4.0