Total Complexity | 2 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class TestElementController extends ElementController implements TestOnly |
||
13 | { |
||
14 | private static $url_segment = 'test-uf-page'; |
||
|
|||
15 | |||
16 | private static $allowed_actions = [ |
||
17 | 'Form', |
||
18 | ]; |
||
19 | |||
20 | public function Form() |
||
21 | { |
||
22 | $elementform = new Form( |
||
23 | $this, |
||
24 | 'Form', |
||
25 | new FieldList( |
||
26 | new TextField('TestValue') |
||
27 | ), |
||
28 | new FieldList( |
||
29 | new FormAction('doAction') |
||
30 | ) |
||
31 | ); |
||
32 | |||
33 | return $elementform; |
||
34 | } |
||
35 | |||
36 | public function doAction($data, $form) |
||
42 | ); |
||
43 | } |
||
45 |