root/trunk/examples/patExampleGen/sections_renderer.php

Revision 290, 3.6 kB (checked in by schst, 3 years ago)

Added support for errors in the String renderer (requested by Arnaud)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 <?php
2 /**
3  * Definitions for the examples on the renderers that can be used to render forms.
4  *
5  * $Id$
6  *
7  * @package        patForms
8  * @subpackage    Examples
9  * @author        Sebastian Mordziol <argh@php-tools.net>
10  */
11
12     $sections['Renderer'] = array(
13         'descr'        =>    'These examples show how to use renderers to control the
14                         layout of your form and form elements',
15         'basename'    =>    'example_renderer_',
16         'pages'        =>    array(
17             'array' => array(
18                 'state'    =>    'Stable',
19                 'title'    =>    'Array',
20                 'descr'    =>    'Renders a form into an array containing the serialized
21                             elements along with their attributes.',
22             ),
23             'string' => array(
24                 'state'    =>    'Stable',
25                 'title'    =>    'String',
26                 'descr'    =>    'Renders a form using a template with placeholders to
27                             place the serialized elements freely.',
28                 'tabs'  =>  array(
29                     'template' => array(
30                         'title' => 'Template source',
31                         'type'  => 'phpSource',
32                         'file'  => 'templates/$exampleId.html',
33                     ),
34                 ),
35             ),
36             'string_errors' => array(
37                 'state'    =>    'Stable',
38                 'title'    =>    'String with errors',
39                 'descr'    =>    'Renders a form using a template with placeholders to
40                             place the serialized elements freely and renders a list of errors
41                             above the form.',
42                 'tabs'  =>  array(
43                     'template' => array(
44                         'title' => 'Template source',
45                         'type'  => 'phpSource',
46                         'file'  => 'templates/$exampleId.html',
47                     ),
48                 ),
49             ),
50             'string_placeholders' => array(
51                 'title'    =>    'String, custom placeholders',
52                 'descr'    =>    'The string renderer enables you to set custom placeholders
53                             that will be used to insert the elements in the form
54                             template.',
55                 'tabs'  =>  array(
56                     'template' => array(
57                         'title' => 'Template source',
58                         'type'  => 'phpSource',
59                         'file'  => 'templates/$exampleId.html',
60                     ),
61                 ),
62             ),
63             'string_attributes' => array(
64                 'title'    =>    'String, set replaceable attributes',
65                 'descr'    =>    'By default the string renderer gives you the possibility
66                             to insert a few of an element\'s attributes into the form
67                             template via placeholders, but sometimes you will need more.',
68                 'tabs'  =>  array(
69                     'template' => array(
70                         'title' => 'Template source',
71                         'type'  => 'phpSource',
72                         'file'  => 'templates/$exampleId.html',
73                     ),
74                 ),
75             ),
76             'radiogroup' => array(
77                 'state'    =>    'Beta',
78                 'title'    =>    'Rendering a Radio Group',
79                 'descr'    =>    'A Radiobutton group element can have its own renderer,
80                             which makes it possible to separate content from layout
81                             even with groups of radio buttons.',
82             ),
83             'pattemplate' => array(
84                 'state'    =>    'Stable',
85                 'title'    =>    'patTemplate',
86                 'descr'    =>    'Renders a form using a patTemplate 3.0.0 or higher.',
87                 'tabs'  =>  array(
88                     'template' => array(
89                         'title' => 'Template source',
90                         'type'  => 'phpSource',
91                         'file'  => 'templates/$exampleId.tmpl',
92                     ),
93                 ),
94             ),
95             'pattemplate_form' => array(
96                 'state'    =>    'Stable',
97                 'title'    =>    'patTemplate with form errors',
98                 'descr'    =>    'Shows how to render errors that are not attached to one element but the form.',
99                 'tabs'  =>  array(
100                     'template' => array(
101                         'title' => 'Template source',
102                         'type'  => 'phpSource',
103                         'file'  => 'templates/$exampleId.tmpl',
104                     ),
105                 ),
106             ),
107             'pattemplate_repeat' => array(
108                 'state'    =>    'Stable',
109                 'title'    =>    'patTemplate with repeating template',
110                 'descr'    =>    'Shows how to render several elements by re-using one template that will be repeated.',
111                 'tabs'  =>  array(
112                     'template' => array(
113                         'title' => 'Template source',
114                         'type'  => 'phpSource',
115                         'file'  => 'templates/$exampleId.tmpl',
116                     ),
117                 ),
118             ),
119         )
120     );
121 ?>
Note: See TracBrowser for help on using the browser.