EditFieldsForm.php
3 weeks ago
FormAbstract.php
3 weeks ago
FormIntegration.php
3 weeks ago
FormInterface.php
3 weeks ago
SettingsPageForm.php
3 weeks ago
FormInterface.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WPDesk\FCF\Free\Settings\Form; |
| 4 | |
| 5 | /** |
| 6 | * Interface for form settings. |
| 7 | */ |
| 8 | interface FormInterface { |
| 9 | |
| 10 | /** |
| 11 | * Returns type of form. |
| 12 | * |
| 13 | * @return string Type of form. |
| 14 | */ |
| 15 | public function get_form_type(): string; |
| 16 | |
| 17 | /** |
| 18 | * Returns basic settings for form. |
| 19 | * |
| 20 | * @param array $form_data Default settings of form. |
| 21 | * @param string $form_key Key of form. |
| 22 | * |
| 23 | * @return array Settings of form. |
| 24 | */ |
| 25 | public function get_form_data( array $form_data, string $form_key = '' ): array; |
| 26 | |
| 27 | /** |
| 28 | * Saves settings for form. |
| 29 | * |
| 30 | * @param array $params Params for endpoint. |
| 31 | * |
| 32 | * @return bool Status of process. |
| 33 | */ |
| 34 | public function save_form_data( array $params ): bool; |
| 35 | } |
| 36 |