1 | <?php |
||
8 | class Footer implements Renderable |
||
9 | { |
||
10 | /** |
||
11 | * Footer view. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $view = 'admin::form.footer'; |
||
16 | |||
17 | /** |
||
18 | * Form builder instance. |
||
19 | * |
||
20 | * @var Builder |
||
21 | */ |
||
22 | protected $builder; |
||
23 | |||
24 | /** |
||
25 | * Available buttons. |
||
26 | * |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $buttons = ['reset', 'submit']; |
||
30 | |||
31 | /** |
||
32 | * Available checkboxes. |
||
33 | * |
||
34 | * @var array |
||
35 | */ |
||
36 | protected $checkboxes = ['view', 'continue_editing', 'continue_creating']; |
||
37 | |||
38 | /** |
||
39 | * Footer constructor. |
||
40 | * |
||
41 | * @param Builder $builder |
||
42 | */ |
||
43 | public function __construct(Builder $builder) |
||
47 | |||
48 | /** |
||
49 | * Disable reset button. |
||
50 | * |
||
51 | * @return $this |
||
52 | */ |
||
53 | public function disableReset() |
||
59 | |||
60 | /** |
||
61 | * Disable submit button. |
||
62 | * |
||
63 | * @return $this |
||
64 | */ |
||
65 | public function disableSubmit() |
||
71 | |||
72 | /** |
||
73 | * Disable View Checkbox. |
||
74 | * |
||
75 | * @return $this |
||
76 | */ |
||
77 | public function disableViewCheck() |
||
83 | |||
84 | /** |
||
85 | * Disable Editing Checkbox. |
||
86 | * |
||
87 | * @return $this |
||
88 | */ |
||
89 | public function disableEditingCheck() |
||
95 | |||
96 | /** |
||
97 | * Disable Creating Checkbox. |
||
98 | * |
||
99 | * @return $this |
||
100 | */ |
||
101 | public function disableCreatingCheck() |
||
107 | |||
108 | /** |
||
109 | * Setup scripts. |
||
110 | */ |
||
111 | protected function setupScript() |
||
121 | |||
122 | /** |
||
123 | * Render footer. |
||
124 | * |
||
125 | * @return string |
||
126 | */ |
||
127 | public function render() |
||
139 | } |
||
140 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: