1 | <?php |
||
6 | class UserForm extends Form { |
||
|
|||
7 | |||
8 | /** |
||
9 | * @param Controller $controller |
||
10 | * @param string $name |
||
11 | */ |
||
12 | public function __construct(Controller $controller, $name = 'Form') { |
||
51 | |||
52 | public function setupFormErrors() |
||
61 | |||
62 | /** |
||
63 | * Used for partial caching in the template. |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | public function getLastEdited() { |
||
70 | |||
71 | /** |
||
72 | * @return bool |
||
73 | */ |
||
74 | public function getDisplayErrorMessagesAtTop() { |
||
77 | |||
78 | /** |
||
79 | * Return the fieldlist, filtered to only contain steps |
||
80 | * |
||
81 | * @return ArrayList |
||
82 | */ |
||
83 | public function getSteps() { |
||
88 | |||
89 | /** |
||
90 | * Get the form fields for the form on this page. Can modify this FieldSet |
||
91 | * by using {@link updateFormFields()} on an {@link Extension} subclass which |
||
92 | * is applied to this controller. |
||
93 | * |
||
94 | * This will be a list of top level composite steps |
||
95 | * |
||
96 | * @return FieldList |
||
97 | */ |
||
98 | public function getFormFields() { |
||
109 | |||
110 | /** |
||
111 | * Generate the form actions for the UserDefinedForm. You |
||
112 | * can manipulate these by using {@link updateFormActions()} on |
||
113 | * a decorator. |
||
114 | * |
||
115 | * @todo Make form actions editable via their own field editor. |
||
116 | * |
||
117 | * @return FieldList |
||
118 | */ |
||
119 | public function getFormActions() { |
||
135 | |||
136 | /** |
||
137 | * Get the required form fields for this form. |
||
138 | * |
||
139 | * @return RequiredFields |
||
140 | */ |
||
141 | public function getRequiredFields() { |
||
153 | |||
154 | /** |
||
155 | * Override some we can add UserForm specific attributes to the form. |
||
156 | * |
||
157 | * @return array |
||
158 | */ |
||
159 | public function getAttributes() { |
||
169 | } |
||
170 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.