Total Complexity | 2 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
16 | class TestWidgetController extends WidgetController implements TestOnly |
||
17 | { |
||
18 | private static $allowed_actions = array( |
||
|
|||
19 | 'Form' |
||
20 | ); |
||
21 | |||
22 | public function Form() |
||
23 | { |
||
24 | $widgetform = new Form( |
||
25 | $this, |
||
26 | __FUNCTION__, |
||
27 | new FieldList( |
||
28 | new TextField('TestValue') |
||
29 | ), |
||
30 | new FieldList( |
||
31 | new FormAction('doAction') |
||
32 | ) |
||
33 | ); |
||
34 | |||
35 | return $widgetform; |
||
36 | } |
||
37 | |||
38 | public function doAction($data, $form) |
||
44 | ); |
||
45 | } |
||
47 |