| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
$sections['Event'] = array( |
|---|
| 13 |
'descr' => 'Events allow you to implement a ways of handling forms via callbacks |
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
, |
|---|
| 20 |
'basename' => 'example_event_', |
|---|
| 21 |
'pages' => array( |
|---|
| 22 |
'onsubmit' => array( |
|---|
| 23 |
'title' => 'onSubmit', |
|---|
| 24 |
'descr' => 'This example shows how to use the onSubmit handler to interact with |
|---|
| 25 |
|
|---|
| 26 |
, |
|---|
| 27 |
'tabs' => array( |
|---|
| 28 |
'hilights' => array( |
|---|
| 29 |
'title' => 'Relevant parts', |
|---|
| 30 |
'type' => 'guide', |
|---|
| 31 |
'file' => '$exampleId.php', |
|---|
| 32 |
'guide' => array( |
|---|
| 33 |
|
|---|
| 34 |
'lines' => '50-53', |
|---|
| 35 |
'text' => 'Flag that sets whether to cancel the event', |
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
'lines' => '58-60', |
|---|
| 39 |
'text' => 'Register the event handler', |
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
'lines' => '62-83', |
|---|
| 43 |
'text' => 'The event handling function', |
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
'annotation' => array( |
|---|
| 48 |
'title' => 'Notes', |
|---|
| 49 |
'type' => 'text', |
|---|
| 50 |
'text' => 'You will probably have noticed that the event is cancelled |
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
, |
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
'onsuccess' => array( |
|---|
| 59 |
'title' => 'onSuccess', |
|---|
| 60 |
'descr' => 'This example shows how to use the onSuccess handler to build a |
|---|
| 61 |
, |
|---|
| 62 |
'tabs' => array( |
|---|
| 63 |
'hilights' => array( |
|---|
| 64 |
'title' => 'Relevant parts', |
|---|
| 65 |
'type' => 'guide', |
|---|
| 66 |
'file' => '$exampleId.php', |
|---|
| 67 |
'guide' => array( |
|---|
| 68 |
|
|---|
| 69 |
'lines' => '98-100', |
|---|
| 70 |
'text' => 'Register the event handler', |
|---|
| 71 |
|
|---|
| 72 |
|
|---|
| 73 |
'lines' => '102-122', |
|---|
| 74 |
'text' => 'The event handling function', |
|---|
| 75 |
|
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
|
|---|
| 80 |
'onerror' => array( |
|---|
| 81 |
'title' => 'onError', |
|---|
| 82 |
'descr' => 'This example shows how to use the onSuccess handler to build a |
|---|
| 83 |
, |
|---|
| 84 |
'tabs' => array( |
|---|
| 85 |
'hilights' => array( |
|---|
| 86 |
'title' => 'Relevant parts', |
|---|
| 87 |
'type' => 'guide', |
|---|
| 88 |
'file' => '$exampleId.php', |
|---|
| 89 |
'guide' => array( |
|---|
| 90 |
|
|---|
| 91 |
'lines' => '53-55', |
|---|
| 92 |
'text' => 'Register the event handler', |
|---|
| 93 |
|
|---|
| 94 |
|
|---|
| 95 |
'lines' => '57-84', |
|---|
| 96 |
'text' => 'The event handling function', |
|---|
| 97 |
|
|---|
| 98 |
|
|---|
| 99 |
|
|---|
| 100 |
|
|---|
| 101 |
|
|---|
| 102 |
'combined' => array( |
|---|
| 103 |
'title' => 'Combining several event handlers', |
|---|
| 104 |
'descr' => 'This example shows you how to use several handlers in one script |
|---|
| 105 |
|
|---|
| 106 |
), |
|---|
| 107 |
'object' => array( |
|---|
| 108 |
'title' => 'Using an object as event handler', |
|---|
| 109 |
'descr' => 'This example shows you how to register an object that provides method |
|---|
| 110 |
|
|---|
| 111 |
, |
|---|
| 112 |
'tabs' => array( |
|---|
| 113 |
'hilights' => array( |
|---|
| 114 |
'title' => 'Relevant parts', |
|---|
| 115 |
'type' => 'guide', |
|---|
| 116 |
'file' => '$exampleId.php', |
|---|
| 117 |
'guide' => array( |
|---|
| 118 |
|
|---|
| 119 |
'lines' => '53-106', |
|---|
| 120 |
'text' => 'The event handling class', |
|---|
| 121 |
|
|---|
| 122 |
|
|---|
| 123 |
'lines' => '108-109', |
|---|
| 124 |
'text' => 'Instantiating the event handler object', |
|---|
| 125 |
|
|---|
| 126 |
|
|---|
| 127 |
'lines' => '111-112', |
|---|
| 128 |
'text' => 'Registering the event handler object', |
|---|
| 129 |
|
|---|
| 130 |
|
|---|
| 131 |
|
|---|
| 132 |
|
|---|
| 133 |
|
|---|
| 134 |
|
|---|
| 135 |
|
|---|
| 136 |
?> |
|---|