actions
3 years ago
api
3 years ago
methods
3 years ago
rest-api
3 years ago
active-campaign.php
3 years ago
active-campaign.php
27 lines
| 1 | <?php |
| 2 | |
| 3 | |
| 4 | namespace Jet_Form_Builder\Integrations\Active_Campaign; |
| 5 | |
| 6 | |
| 7 | use Jet_Form_Builder\Actions\Manager; |
| 8 | use Jet_Form_Builder\Integrations\Active_Campaign\Actions\Active_Campaign_Action; |
| 9 | use Jet_Form_Builder\Integrations\Active_Campaign\Rest_Api\Rest_Controller; |
| 10 | |
| 11 | class Active_Campaign { |
| 12 | |
| 13 | public function __construct() { |
| 14 | ( new Rest_Controller() )->rest_api_init(); |
| 15 | |
| 16 | add_action( 'jet-form-builder/actions/register', array( $this, 'add_action' ) ); |
| 17 | } |
| 18 | |
| 19 | public function add_action( Manager $manager ) { |
| 20 | $manager->register_action_type( new Active_Campaign_Action() ); |
| 21 | } |
| 22 | |
| 23 | public static function register() { |
| 24 | new static(); |
| 25 | } |
| 26 | |
| 27 | } |