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 / Events / Integration / IntegrationRegisteredEvent.php

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

97 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Integration Registered Event
4 *
5 * @package Forge12\DoubleOptIn\Events\Integration
6 * @since 4.0.0
7 */
8
9 namespace Forge12\DoubleOptIn\Events\Integration;
10
11 use Forge12\DoubleOptIn\EventSystem\Event;
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 /**
18 * Class IntegrationRegisteredEvent
19 *
20 * @api
21 *
22 * Dispatched after a form integration is registered in the registry.
23 * Useful for extending or modifying integration behavior.
24 * Covered by the Addon API semver policy as of Core API 4.3.0.
25 */
26 class IntegrationRegisteredEvent extends Event {
27
28 /**
29 * The integration identifier.
30 *
31 * @var string
32 */
33 private string $integrationId;
34
35 /**
36 * The integration display name.
37 *
38 * @var string
39 */
40 private string $name;
41
42 /**
43 * Whether the integration is available.
44 *
45 * @var bool
46 */
47 private bool $isAvailable;
48
49 /**
50 * Constructor.
51 *
52 * @param string $integrationId The integration identifier.
53 * @param string $name The integration display name.
54 * @param bool $isAvailable Whether the integration is available.
55 */
56 public function __construct( string $integrationId, string $name, bool $isAvailable ) {
57 parent::__construct();
58 $this->integrationId = $integrationId;
59 $this->name = $name;
60 $this->isAvailable = $isAvailable;
61 }
62
63 /**
64 * {@inheritdoc}
65 */
66 public static function getWordPressHookName(): string {
67 return 'f12_cf7_doubleoptin_integration_registered';
68 }
69
70 /**
71 * Get the integration identifier.
72 *
73 * @return string
74 */
75 public function getIntegrationId(): string {
76 return $this->integrationId;
77 }
78
79 /**
80 * Get the integration display name.
81 *
82 * @return string
83 */
84 public function getName(): string {
85 return $this->name;
86 }
87
88 /**
89 * Check if the integration is available.
90 *
91 * @return bool True if available.
92 */
93 public function isAvailable(): bool {
94 return $this->isAvailable;
95 }
96 }
97