XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
formtext.php
1<?php
13
14if (!defined('XOOPS_ROOT_PATH')) {
15 exit();
16}
17
21class XoopsFormText extends XoopsFormElement
22{
29 public $_size;
30
37 public $_maxlength;
38
45 public $_value;
46
56 public function __construct($caption, $name, $size, $maxlength, $value = '')
57 {
58 $this->setCaption($caption);
59 $this->setName($name);
60 $this->_size = (int)$size;
61 $this->_maxlength = (int)$maxlength;
62 $this->setValue($value);
63 }
64 public function XoopsFormText($caption, $name, $size, $maxlength, $value= '')
65 {
66 return $this->__construct($caption, $name, $size, $maxlength, $value);
67 }
68
74 public function getSize()
75 {
76 return $this->_size;
77 }
78
84 public function getMaxlength()
85 {
86 return $this->_maxlength;
87 }
88
94 public function getValue()
95 {
96 return $this->_value;
97 }
98
104 public function setValue($value)
105 {
106 $this->_value = $value;
107 }
108
114 public function render()
115 {
116 $root =& XCube_Root::getSingleton();
117 $renderSystem =& $root->getRenderSystem(XOOPSFORM_DEPENDENCE_RENDER_SYSTEM);
118
119 $renderTarget =& $renderSystem->createRenderTarget('main');
120
121 $renderTarget->setAttribute('legacy_module', 'legacy');
122 $renderTarget->setTemplateName('legacy_xoopsform_text.html');
123 $renderTarget->setAttribute('element', $this);
124
125 $renderSystem->render($renderTarget);
126
127 return $renderTarget->getResult();
128 }
129}
setCaption($caption)
setValue($value)
Definition formtext.php:104
__construct($caption, $name, $size, $maxlength, $value='')
Definition formtext.php:56