|
Revision 320, 1.4 kB
(checked in by schst, 3 years ago)
|
Parser now uses the element's id for the placeholder. Parser_patTemplateRenderer and Parser_SimpleRenderer now use the matching renderers as delegates (fixes bug #184 and #185). This commit may break some scripts, but the parser was labelled alpha before.
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
<?PHP |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
class patForms_Parser_SimpleRenderer extends patForms_Parser |
|---|
| 32 |
{ |
|---|
| 33 |
|
|---|
| 34 |
* gathers serialized data from all elements and replaces them in the outputFile. |
|---|
| 35 |
* |
|---|
| 36 |
* @access public |
|---|
| 37 |
* @param object &$patForms Reference to the patForms object |
|---|
| 38 |
* @param mixed $args optional arguments |
|---|
| 39 |
* @return string $html HTML code |
|---|
| 40 |
*/ |
|---|
| 41 |
function render(&$patForms, $args = null) |
|---|
| 42 |
{ |
|---|
| 43 |
$renderer = &patForms::createRenderer('String'); |
|---|
| 44 |
$renderer->setTemplate($this->getHTML()); |
|---|
| 45 |
$renderer->setPlaceholder($this->_placeholder, 'id'); |
|---|
| 46 |
$renderer->setFormPlaceholders($this->_placeholder_form_start, $this->_placeholder_form_end); |
|---|
| 47 |
|
|---|
| 48 |
return $renderer->render($patForms, $args); |
|---|
| 49 |
} |
|---|
| 50 |
} |
|---|
| 51 |
?> |
|---|