XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
formlabel.php
1<?php
13
14if (!defined('XOOPS_ROOT_PATH')) {
15 exit();
16}
17
18class XoopsFormLabel extends XoopsFormElement
19{
20
26 public $_value;
27
34 public function __construct($caption= '', $value= '')
35 {
36 $this->setCaption($caption);
37 $this->_value = $value;
38 }
39 public function XoopsFormLabel($caption= '', $value= '')
40 {
41 return $this->__construct($caption, $value);
42 }
43
49 public function getValue()
50 {
51 return $this->_value;
52 }
53
59 public function render()
60 {
61 $root =& XCube_Root::getSingleton();
62 $renderSystem =& $root->getRenderSystem(XOOPSFORM_DEPENDENCE_RENDER_SYSTEM);
63
64 $renderTarget =& $renderSystem->createRenderTarget('main');
65
66 $renderTarget->setAttribute('legacy_module', 'legacy');
67 $renderTarget->setTemplateName('legacy_xoopsform_label.html');
68 $renderTarget->setAttribute('element', $this);
69
70 $renderSystem->render($renderTarget);
71
72 return $renderTarget->getResult();
73 }
74}
setCaption($caption)
__construct($caption='', $value='')
Definition formlabel.php:34