1 | <?php |
||
27 | class PartialFormSubmission extends SubmittedForm |
||
28 | { |
||
29 | private static $table_name = 'PartialFormSubmission'; |
||
|
|||
30 | |||
31 | /** |
||
32 | * @var array |
||
33 | */ |
||
34 | private static $db = [ |
||
35 | 'IsSend' => 'Boolean(false)', |
||
36 | 'Password' => 'Varchar(64)', |
||
37 | ]; |
||
38 | |||
39 | /** |
||
40 | * @var array |
||
41 | */ |
||
42 | private static $has_one = [ |
||
43 | 'UserDefinedForm' => DataObject::class |
||
44 | ]; |
||
45 | |||
46 | /** |
||
47 | * @var array |
||
48 | */ |
||
49 | private static $has_many = [ |
||
50 | 'PartialFields' => PartialFieldSubmission::class |
||
51 | ]; |
||
52 | |||
53 | private static $special_characters = [ |
||
54 | '!', |
||
55 | '@', |
||
56 | '#', |
||
57 | '$', |
||
58 | '%', |
||
59 | '^', |
||
60 | '&', |
||
61 | '*', |
||
62 | '(', |
||
63 | ')', |
||
64 | '_', |
||
65 | '-', |
||
66 | '=', |
||
67 | '+', |
||
68 | ';', |
||
69 | ':', |
||
70 | ',', |
||
71 | '.', |
||
72 | '?' |
||
73 | ]; |
||
74 | |||
75 | /** |
||
76 | * @return FieldList |
||
77 | */ |
||
78 | public function getCMSFields() |
||
106 | |||
107 | /** |
||
108 | * @return DataObject|UserDefinedForm |
||
109 | */ |
||
110 | public function getParent() |
||
114 | |||
115 | /** |
||
116 | * If the submission is password protected, generate a password. |
||
117 | */ |
||
118 | public function onBeforeWrite() |
||
135 | |||
136 | /** |
||
137 | * @param Member |
||
138 | * |
||
139 | * @return boolean|string |
||
140 | */ |
||
141 | public function canCreate($member = null, $context = []) |
||
149 | |||
150 | /** |
||
151 | * @param Member |
||
152 | * |
||
153 | * @return boolean|string |
||
154 | */ |
||
155 | public function canView($member = null) |
||
163 | |||
164 | /** |
||
165 | * @param Member |
||
166 | * |
||
167 | * @return boolean|string |
||
168 | */ |
||
169 | public function canEdit($member = null) |
||
177 | |||
178 | /** |
||
179 | * @param Member |
||
180 | * |
||
181 | * @return boolean|string |
||
182 | */ |
||
183 | public function canDelete($member = null) |
||
191 | } |
||
192 |