1 | <?php |
||
23 | class EntryNotFoundException extends FormzException |
||
24 | { |
||
25 | const FIELD_NOT_FOUND = 'The field "%s" was not found in the form "%s" with class "%s".'; |
||
26 | |||
27 | const CONDITION_NOT_FOUND = 'No condition "%s" was found.'; |
||
28 | |||
29 | const VALIDATION_NOT_FOUND = 'The validation "%s" was not found. Please use the function `%s::hasValidation()` before.'; |
||
30 | |||
31 | const VALIDATION_NOT_FOUND_FOR_FIELD = 'The field "%s" does not have a rule "%s".'; |
||
32 | |||
33 | const ERROR_KEY_NOT_FOUND_FOR_VALIDATOR = 'The error key "%s" does not exist for the validator "%s".'; |
||
34 | |||
35 | const VIEW_HELPER_FIELD_NOT_FOUND = 'The field "%s" could not be fetched for the view helper "%s": please either use this view helper inside the view helper "%s", or fill the parameter `field` of this view helper with the field name you want.'; |
||
36 | |||
37 | const FIELD_VIEW_HELPER_LAYOUT_NOT_FOUND = 'The layout "%s" could not be found. Please check your TypoScript configuration.'; |
||
38 | |||
39 | const FIELD_VIEW_HELPER_LAYOUT_ITEM_NOT_FOUND = 'The layout "%s" does not have an item "%s".'; |
||
40 | |||
41 | const CONTROLLER_SERVICE_ACTION_FORM_ARGUMENT_MISSING = 'The method `%s::%s()` must have a parameter `$%s`. Note that you can also change the parameter `name` of the form view helper.'; |
||
42 | |||
43 | const SLOT_NOT_FOUND = 'No slot "%s" was found.'; |
||
44 | |||
45 | /** |
||
46 | * @code 1488482191 |
||
47 | * |
||
48 | * @param string $name |
||
49 | * @return self |
||
50 | */ |
||
51 | final public static function conditionNotFound($name) |
||
61 | |||
62 | /** |
||
63 | * @code 1487672276 |
||
64 | * |
||
65 | * @param string $name |
||
66 | * @return self |
||
67 | */ |
||
68 | final public static function validationNotFound($name) |
||
78 | |||
79 | /** |
||
80 | * @code 1487672956 |
||
81 | * |
||
82 | * @param string $validationName |
||
83 | * @param string $fieldName |
||
84 | * @return EntryNotFoundException |
||
85 | */ |
||
86 | final public static function ajaxControllerValidationNotFoundForField($validationName, $fieldName) |
||
96 | |||
97 | /** |
||
98 | * @code 1487671603 |
||
99 | * |
||
100 | * @param string $fieldName |
||
101 | * @param FormObject $formObject |
||
102 | * @return EntryNotFoundException |
||
103 | */ |
||
104 | final public static function ajaxControllerFieldNotFound($fieldName, FormObject $formObject) |
||
114 | |||
115 | /** |
||
116 | * @code 1455272659 |
||
117 | * |
||
118 | * @param string $key |
||
119 | * @param AbstractValidator $validator |
||
120 | * @return EntryNotFoundException |
||
121 | */ |
||
122 | final public static function errorKeyNotFoundForValidator($key, AbstractValidator $validator) |
||
132 | |||
133 | /** |
||
134 | * @code 1487947224 |
||
135 | * |
||
136 | * @param string $fieldName |
||
137 | * @param FormObject $formObject |
||
138 | * @return EntryNotFoundException |
||
139 | */ |
||
140 | final public static function equalsToFieldValidatorFieldNotFound($fieldName, FormObject $formObject) |
||
150 | |||
151 | /** |
||
152 | * @code 1467623761 |
||
153 | * |
||
154 | * @param string $fieldName |
||
155 | * @return self |
||
156 | */ |
||
157 | final public static function classViewHelperFieldNotFound($fieldName) |
||
167 | |||
168 | /** |
||
169 | * @code 1467624152 |
||
170 | * |
||
171 | * @param string $fieldName |
||
172 | * @return self |
||
173 | */ |
||
174 | final public static function formatMessageViewHelperFieldNotFound($fieldName) |
||
184 | |||
185 | /** |
||
186 | * @code 1465243586 |
||
187 | * |
||
188 | * @param string $layoutName |
||
189 | * @return self |
||
190 | */ |
||
191 | final public static function fieldViewHelperLayoutNotFound($layoutName) |
||
201 | |||
202 | /** |
||
203 | * @code 1485867803 |
||
204 | * |
||
205 | * @param string $layoutName |
||
206 | * @param string $itemName |
||
207 | * @return EntryNotFoundException |
||
208 | */ |
||
209 | final public static function fieldViewHelperLayoutItemNotFound($layoutName, $itemName) |
||
219 | |||
220 | /** |
||
221 | * @code 1473084335 |
||
222 | * |
||
223 | * @param string $fieldName |
||
224 | * @param FormObject $formObject |
||
225 | * @return EntryNotFoundException |
||
226 | */ |
||
227 | final public static function formatMessageViewHelperFieldNotFoundInForm($fieldName, FormObject $formObject) |
||
237 | |||
238 | /** |
||
239 | * @code 1457441846 |
||
240 | * |
||
241 | * @param string $controllerObjectName |
||
242 | * @param string $actionName |
||
243 | * @param string $formName |
||
244 | * @return EntryNotFoundException |
||
245 | */ |
||
246 | final public static function controllerServiceActionFormArgumentMissing($controllerObjectName, $actionName, $formName) |
||
247 | { |
||
248 | /** @var self $exception */ |
||
249 | $exception = self::getNewExceptionInstance( |
||
250 | self::CONTROLLER_SERVICE_ACTION_FORM_ARGUMENT_MISSING, |
||
251 | [$controllerObjectName, $actionName . 'Action', $formName] |
||
252 | ); |
||
253 | |||
254 | return $exception; |
||
255 | } |
||
256 | |||
257 | /** |
||
258 | * @code 1488988452 |
||
259 | * |
||
260 | * @param string $name |
||
261 | * @return self |
||
262 | */ |
||
263 | final public static function slotNotFound($name) |
||
273 | } |
||
274 |