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);
00078
00079
00080 $disabled = '';
00081 if ($disable) {
00082
00083 $disabled = ' disabled="disabled"';
00084 }
00085
00086
00087
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
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 }