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

Source for file Hidden.php

Documentation is available at Hidden.php

  1. <?php
  2. /**
  3.  * CNZ Framework
  4.  *
  5.  * A Framework for Creating and Using Complex Web Elements
  6.  *
  7.  * The purpose of this framework is to provide a library of high-level objects
  8.  * to facilitate common HTML coding tasks, such as menus, tables, and forms.
  9.  * The intent is to reduce repetitive HTML coding as much as possible, replacing
  10.  * it with a combination of configuration files and style sheets with
  11.  * standardized naming conventions.
  12.  *
  13.  * This framework is built on and requires the
  14.  * {@link http://framework.zend.com/ Zend Framework}.
  15.  *
  16.  * @category   Cnz
  17.  * @package    Cnz_Html
  18.  * @subpackage Form
  19.  *
  20.  * @author    Lyle Frost <lfrost@cnz.com>
  21.  * @copyright Copyright (c) 2006-2007 Citadel Network <{@link http://www.citadelnetwork.com/}>
  22.  * @filesource
  23.  * @license   http://www.citadelnetwork.com/license/cnzframework New BSD License
  24.  * @version   $Id: Hidden.php 27 2007-07-19 18:47:54Z lfrost $
  25.  */
  26.  
  27. /**
  28.  * Required classes.
  29.  *
  30.  * @ignore
  31.  */
  32. Zend_Loader::loadClass('Cnz_Html_Form_Item');
  33.  
  34. /**
  35.  * HTML Form Hidden class
  36.  *
  37.  * This class automates the creation and display of a hidden field.
  38.  *
  39.  * Example INI:
  40.  *
  41.  * <pre><samp>
  42.  * item.id.type = hidden
  43.  * </samp></pre>
  44.  *
  45.  * @category   Cnz
  46.  * @package    Cnz_Html
  47.  * @subpackage Form
  48.  */
  49. {
  50.     /* Methods ===========================================================*/
  51.  
  52.     /**
  53.      * Option fields:
  54.      *   none
  55.      *
  56.      * Configuration fields:
  57.      *   none
  58.      *
  59.      * @param  array       $options Options
  60.      * @param  Zend_Config $config  Configuration
  61.      */
  62.     public function __construct(array $options array()Zend_Config $config NULL)
  63.     {
  64.         parent::__construct($options$config);
  65.         return;
  66.     }
  67.  
  68.     /**
  69.      * @param  string $style Value for outermost style attribute
  70.      * @return void 
  71.      */
  72.     public function display($style NULL)
  73.     {
  74.         $indent Cnz_Html::indentGenerate();
  75.  
  76.         echo $indent'<div><input name = "'$this->name'" type = "hidden" value = "'$this->initial'"/></div>'"\n";
  77.  
  78.         return;
  79.     }
  80.  
  81.     /**
  82.      * No output for hidden fields.
  83.      *
  84.      * @param  array  $data Form data
  85.      * @return string 
  86.      */
  87.     public function submitString(array $data NULL)
  88.     {
  89.         return '';
  90.     }
  91. }

Documentation generated on Thu, 19 Jul 2007 15:02:06 -0400 by phpDocumentor 1.4.0RC2