XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
formfile.php
1<?php
13
14if (!defined('XOOPS_ROOT_PATH')) {
15 exit();
16}
17
18class XoopsFormFile extends XoopsFormElement
19{
20
26 public $_maxFileSize;
27
35 public function __construct($caption, $name, $maxfilesize)
36 {
37 $this->setCaption($caption);
38 $this->setName($name);
39 $this->_maxFileSize = (int)$maxfilesize;
40 }
41 public function XoopsFormFile($caption, $name, $maxfilesize)
42 {
43 return $this->__construct($caption, $name, $maxfilesize);
44 }
45
51 public function getMaxFileSize()
52 {
53 return $this->_maxFileSize;
54 }
55
61 public function render()
62 {
63 $root =& XCube_Root::getSingleton();
64 $renderSystem =& $root->getRenderSystem(XOOPSFORM_DEPENDENCE_RENDER_SYSTEM);
65
66 $renderTarget =& $renderSystem->createRenderTarget('main');
67
68 $renderTarget->setAttribute('legacy_module', 'legacy');
69 $renderTarget->setTemplateName('legacy_xoopsform_file.html');
70 $renderTarget->setAttribute('element', $this);
71
72 $renderSystem->render($renderTarget);
73
74 return $renderTarget->getResult();
75 }
76}
setCaption($caption)
__construct($caption, $name, $maxfilesize)
Definition formfile.php:35