• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List

E:/E/GEAMP/www/openbiz/openbiz/others/Zend/View/Helper/FormTextarea.php

00001 <?php
00027 require_once 'Zend/View/Helper/FormElement.php';
00028 
00029 
00039 class Zend_View_Helper_FormTextarea extends Zend_View_Helper_FormElement
00040 {
00048     public $rows = 24;
00049 
00057     public $cols = 80;
00058 
00074     public function formTextarea($name, $value = null, $attribs = null)
00075     {
00076         $info = $this->_getInfo($name, $value, $attribs);
00077         extract($info); // name, value, attribs, options, listsep, disable
00078 
00079         // is it disabled?
00080         $disabled = '';
00081         if ($disable) {
00082             // disabled.
00083             $disabled = ' disabled="disabled"';
00084         }
00085 
00086         // Make sure that there are 'rows' and 'cols' values
00087         // as required by the spec.  noted by Orjan Persson.
00088         if (empty($attribs['rows'])) {
00089             $attribs['rows'] = (int) $this->rows;
00090         }
00091         if (empty($attribs['cols'])) {
00092             $attribs['cols'] = (int) $this->cols;
00093         }
00094 
00095         // build the element
00096         $xhtml = '<textarea name="' . $this->view->escape($name) . '"'
00097                 . ' id="' . $this->view->escape($id) . '"'
00098                 . $disabled
00099                 . $this->_htmlAttribs($attribs) . '>'
00100                 . $this->view->escape($value) . '</textarea>';
00101 
00102         return $xhtml;
00103     }
00104 }

Generated on Thu Apr 19 2012 17:01:18 for openbiz by  doxygen 1.7.2