1 | <?php |
||||
2 | |||||
3 | namespace LeKoala\MultiStepForm; |
||||
4 | |||||
5 | use SilverStripe\Forms\FormRequestHandler; |
||||
6 | |||||
7 | class MultiStepFormRequestHandler extends FormRequestHandler |
||||
8 | { |
||||
9 | |||||
10 | /** |
||||
11 | * Form model being handled |
||||
12 | * |
||||
13 | * @var MultiStepForm |
||||
14 | */ |
||||
15 | protected $form = null; |
||||
16 | |||||
17 | /** |
||||
18 | * @config |
||||
19 | * @var array |
||||
20 | */ |
||||
21 | private static $allowed_actions = [ |
||||
0 ignored issues
–
show
introduced
by
![]() |
|||||
22 | 'handleField', |
||||
23 | 'httpSubmission', |
||||
24 | 'forTemplate', |
||||
25 | 'gotoStep', |
||||
26 | ]; |
||||
27 | |||||
28 | public function checkAccessAction($action) |
||||
29 | { |
||||
30 | if ($action === 'gotoStep') { |
||||
31 | return true; |
||||
32 | } |
||||
33 | return parent::checkAccessAction($action); |
||||
34 | } |
||||
35 | |||||
36 | /** |
||||
37 | * @param HTTPRequest $request |
||||
0 ignored issues
–
show
|
|||||
38 | * @return HTTPResponse |
||||
0 ignored issues
–
show
|
|||||
39 | * @throws HTTPResponse_Exception |
||||
40 | */ |
||||
41 | public function gotoStep($request) |
||||
0 ignored issues
–
show
The parameter
$request is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||
42 | { |
||||
43 | return $this->form->gotoStep(); |
||||
44 | } |
||||
45 | } |
||||
46 |