RouteAbstract.php
3 weeks ago
RouteIntegration.php
3 weeks ago
RouteInterface.php
3 weeks ago
UpdateFormFieldsRoute.php
3 weeks ago
UpdateFormSettingsRoute.php
3 weeks ago
RouteAbstract.php
45 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WPDesk\FCF\Free\Settings\Route; |
| 4 | |
| 5 | /** |
| 6 | * {@inheritdoc} |
| 7 | */ |
| 8 | abstract class RouteAbstract implements RouteInterface { |
| 9 | |
| 10 | /** |
| 11 | * {@inheritdoc} |
| 12 | */ |
| 13 | public function get_route_methods(): array { |
| 14 | return [ 'POST' ]; |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * {@inheritdoc} |
| 19 | */ |
| 20 | public function get_route_params(): array { |
| 21 | return [ |
| 22 | 'form_values' => [ |
| 23 | 'description' => 'Form values', |
| 24 | 'required' => true, |
| 25 | 'default' => [], |
| 26 | ], |
| 27 | 'form_field_name' => [ |
| 28 | 'description' => 'Key of field', |
| 29 | 'required' => true, |
| 30 | 'default' => '', |
| 31 | ], |
| 32 | 'form_section' => [ |
| 33 | 'description' => 'Section name', |
| 34 | 'required' => true, |
| 35 | 'default' => '', |
| 36 | ], |
| 37 | 'form_fields' => [ |
| 38 | 'description' => 'Form fields', |
| 39 | 'required' => true, |
| 40 | 'default' => [], |
| 41 | ], |
| 42 | ]; |
| 43 | } |
| 44 | } |
| 45 |