XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
formtextarea.php
1<?php
13
14if (!defined('XOOPS_ROOT_PATH')) {
15 exit();
16}
17
18class XoopsFormTextArea extends XoopsFormElement
19{
25 public $_cols;
26
32 public $_rows;
33
39 public $_value;
40
50 public function __construct($caption, $name, $value= '', $rows=5, $cols=50)
51 {
52 $this->setCaption($caption);
53 $this->setName($name);
54 $this->_rows = (int)$rows;
55 $this->_cols = (int)$cols;
56 $this->setValue($value);
57 }
58 public function XoopsFormTextArea($caption, $name, $value= '', $rows=5, $cols=50)
59 {
60 return $this->__construct($caption, $name, $value, $rows, $cols);
61 }
62
68 public function getRows()
69 {
70 return $this->_rows;
71 }
72
78 public function getCols()
79 {
80 return $this->_cols;
81 }
82
88 public function getValue()
89 {
90 return $this->_value;
91 }
92
98 public function setValue($value)
99 {
100 $this->_value = $value;
101 }
102
108 public function render()
109 {
110 $root =& XCube_Root::getSingleton();
111 $renderSystem =& $root->getRenderSystem(XOOPSFORM_DEPENDENCE_RENDER_SYSTEM);
112
113 $renderTarget =& $renderSystem->createRenderTarget();
114
115 $renderTarget->setAttribute('legacy_module', 'legacy');
116 $renderTarget->setTemplateName('legacy_xoopsform_textarea.html');
117 $renderTarget->setAttribute('element', $this);
118 $renderTarget->setAttribute('class', $this->getClass());
119
120 $renderSystem->render($renderTarget);
121
122 return $renderTarget->getResult();
123 }
124}
setCaption($caption)
__construct($caption, $name, $value='', $rows=5, $cols=50)