PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.5.0
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.5.0
5.5.0 5.4.0 5.3.2 5.3.1 5.1.6 5.1.5 trunk 2.1.5 2.11 2.12 2.13 2.15 3.0.0 3.0.1 3.0.2 3.0.3 3.0.5 3.0.51 3.0.60 3.0.61 3.0.62 3.0.70 3.0.71 3.0.72 3.1.0 All 34 releases
double-opt-in / src / Integration / AdminPanelInterface.php

AdminPanelInterface.php in Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification 5.5.0, at src/Integration/AdminPanelInterface.php

82 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Admin Panel Interface
4 *
5 * @package Forge12\DoubleOptIn\Integration
6 * @since 4.0.0
7 */
8
9 namespace Forge12\DoubleOptIn\Integration;
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit;
13 }
14
15 /**
16 * Interface AdminPanelInterface
17 *
18 * Contract for integrations that provide an admin configuration panel.
19 * This interface extends the basic FormIntegrationInterface with admin UI capabilities.
20 */
21 interface AdminPanelInterface {
22
23 /**
24 * Register admin hooks for the panel.
25 *
26 * Called during admin_init to set up editor panels, metaboxes, etc.
27 *
28 * @return void
29 */
30 public function registerAdminHooks(): void;
31
32 /**
33 * Enqueue admin scripts and styles.
34 *
35 * @param string $hook The current admin page hook.
36 *
37 * @return void
38 */
39 public function enqueueAdminAssets( string $hook ): void;
40
41 /**
42 * Render the admin panel.
43 *
44 * @param mixed $form The form object (type depends on form system).
45 * @param array $metadata The current form settings.
46 *
47 * @return void
48 */
49 public function render( $form, array $metadata ): void;
50
51 /**
52 * Save the admin panel settings.
53 *
54 * @param int $formId The form ID.
55 * @param array $data The submitted form data.
56 *
57 * @return bool True if save was successful.
58 */
59 public function save( int $formId, array $data ): bool;
60
61 /**
62 * Get the panel title for display in tabs/metaboxes.
63 *
64 * @return string The panel title.
65 */
66 public function getPanelTitle(): string;
67
68 /**
69 * Get available email templates.
70 *
71 * @return array<string, string> Template key => Template label.
72 */
73 public function getAvailableTemplates(): array;
74
75 /**
76 * Get available categories for the form.
77 *
78 * @return array<int, string> Category ID => Category name.
79 */
80 public function getAvailableCategories(): array;
81 }
82