1: <?php
2: /**
3: * You may not change or alter any portion of this comment or credits
4: * of supporting developers from this source code or any supporting source code
5: * which is considered copyrighted (c) material of the original comment or credit authors.
6: * This program is distributed in the hope that it will be useful,
7: * but WITHOUT ANY WARRANTY; without even the implied warranty of
8: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9: */
10:
11: /**
12: * Define Renderer interface for forms
13: *
14: * Each form class has a corresponding renderer method, allowing exact details of the form elements
15: * to be modified as needed,
16: *
17: * @category XoopsForm
18: * @package XoopsFormRendererInterface
19: * @author Richard Griffith <richard@geekwright.com>
20: * @copyright 2017 XOOPS Project (http://xoops.org)
21: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
22: * @link http://xoops.org
23: */
24: interface XoopsFormRendererInterface
25: {
26: /**
27: * Render support for XoopsFormButton
28: *
29: * @param XoopsFormButton $element form element
30: *
31: * @return string rendered form element
32: */
33: public function renderFormButton(XoopsFormButton $element);
34:
35: /**
36: * Render support for XoopsFormButtonTray
37: *
38: * @param XoopsFormButtonTray $element form element
39: *
40: * @return string rendered form element
41: */
42: public function renderFormButtonTray(XoopsFormButtonTray $element);
43:
44: /**
45: * Render support for XoopsFormCheckBox
46: *
47: * @param XoopsFormCheckBox $element form element
48: *
49: * @return string rendered form element
50: */
51: public function renderFormCheckBox(XoopsFormCheckBox $element);
52:
53: /**
54: * Render support for XoopsFormColorPicker
55: *
56: * @param XoopsFormColorPicker $element form element
57: *
58: * @return string rendered form element
59: */
60: public function renderFormColorPicker(XoopsFormColorPicker $element);
61:
62: /**
63: * Render support for XoopsFormDhtmlTextArea
64: *
65: * @param XoopsFormDhtmlTextArea $element form element
66: *
67: * @return string rendered form element
68: */
69: public function renderFormDhtmlTextArea(XoopsFormDhtmlTextArea $element);
70:
71: /**
72: * Render support for XoopsFormElementTray
73: *
74: * @param XoopsFormElementTray $element form element
75: *
76: * @return string rendered form element
77: */
78: public function renderFormElementTray(XoopsFormElementTray $element);
79:
80: /**
81: * Render support for XoopsFormFile
82: *
83: * @param XoopsFormFile $element form element
84: *
85: * @return string rendered form element
86: */
87: public function renderFormFile(XoopsFormFile $element);
88:
89: /**
90: * Render support for XoopsFormLabel
91: *
92: * @param XoopsFormLabel $element form element
93: *
94: * @return string rendered form element
95: */
96: public function renderFormLabel(XoopsFormLabel $element);
97:
98: /**
99: * Render support for XoopsFormPassword
100: *
101: * @param XoopsFormPassword $element form element
102: *
103: * @return string rendered form element
104: */
105: public function renderFormPassword(XoopsFormPassword $element);
106:
107: /**
108: * Render support for XoopsFormRadio
109: *
110: * @param XoopsFormRadio $element form element
111: *
112: * @return string rendered form element
113: */
114: public function renderFormRadio(XoopsFormRadio $element);
115:
116: /**
117: * Render support for XoopsFormSelect
118: *
119: * @param XoopsFormSelect $element form element
120: *
121: * @return string rendered form element
122: */
123: public function renderFormSelect(XoopsFormSelect $element);
124:
125: /**
126: * Render support for XoopsFormText
127: *
128: * @param XoopsFormText $element form element
129: *
130: * @return string rendered form element
131: */
132: public function renderFormText(XoopsFormText $element);
133:
134: /**
135: * Render support for XoopsFormTextArea
136: *
137: * @param XoopsFormTextArea $element form element
138: *
139: * @return string rendered form element
140: */
141: public function renderFormTextArea(XoopsFormTextArea $element);
142:
143: /**
144: * Render support for XoopsFormTextDateSelect
145: *
146: * @param XoopsFormTextDateSelect $element form element
147: *
148: * @return string rendered form element
149: */
150: public function renderFormTextDateSelect(XoopsFormTextDateSelect $element);
151:
152: /**
153: * Render support for XoopsThemeForm
154: *
155: * @param XoopsThemeForm $form form to render
156: *
157: * @return string rendered form
158: */
159: public function renderThemeForm(XoopsThemeForm $form);
160:
161: /**
162: * Support for themed addBreak
163: *
164: * @param XoopsThemeForm $form form
165: * @param string $extra pre-rendered content for break row
166: * @param string $class class for row
167: *
168: * @return void
169: */
170: public function addThemeFormBreak(XoopsThemeForm $form, $extra, $class);
171: }
172: