XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
formpassword.php
1<?php
13
14if (!defined('XOOPS_ROOT_PATH')) {
15 exit();
16}
17
18class XoopsFormPassword extends XoopsFormElement
19{
20
26 public $_size;
27
33 public $_maxlength;
34
40 public $_value;
41
52 public function __construct($caption, $name, $size, $maxlength, $value= '')
53 {
54 $this->setCaption($caption);
55 $this->setName($name);
56 $this->_size = (int)$size;
57 $this->_maxlength = (int)$maxlength;
58 $this->setValue($value);
59 }
60 public function XoopsFormPassword($caption, $name, $size, $maxlength, $value= '')
61 {
62 return $this->__construct($caption, $name, $size, $maxlength, $value);
63 }
64
70 public function getSize()
71 {
72 return $this->_size;
73 }
74
80 public function getMaxlength()
81 {
82 return $this->_maxlength;
83 }
84
90 public function getValue()
91 {
92 return $this->_value;
93 }
94
101 public function setValue($value)
102 {
103 $this->_value = $value;
104 }
105
111 public function render()
112 {
113 $root =& XCube_Root::getSingleton();
114 $renderSystem =& $root->getRenderSystem(XOOPSFORM_DEPENDENCE_RENDER_SYSTEM);
115
116 $renderTarget =& $renderSystem->createRenderTarget('main');
117
118 $renderTarget->setAttribute('legacy_module', 'legacy');
119 $renderTarget->setTemplateName('legacy_xoopsform_password.html');
120 $renderTarget->setAttribute('element', $this);
121
122 $renderSystem->render($renderTarget);
123
124 return $renderTarget->getResult();
125 }
126}
setCaption($caption)
__construct($caption, $name, $size, $maxlength, $value='')