Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/api/classes/integration-manager-controller/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ public function __construct(Application $application)
}
```

### Bootstrapping your integration
Instantiate your integration class on the `fluentform/loaded` action. It fires on every request once Fluent Forms is loaded and passes the Application instance your constructor needs.

```php
/*
* Finally initialize the integration
*/
add_action('fluentform/loaded', function ($app) {
new MyAwesomeIntegration($app);
});
```

### `addActiveNotificationType($types)`

**Source:** `fluentform/app/Http/Controllers/IntegrationManagerController.php` (line 137)
Expand Down Expand Up @@ -305,6 +317,8 @@ public function pushIntegration($integrations, $formId)

### `registerAdminHooks()`

Registers the integration on the **Integrations** screen (`fluentform/global_addons`) and, once enabled, its settings, feed and notification hooks. Call it from your constructor and instantiate the class on `fluentform/loaded` — see [Bootstrapping your integration](/api/classes/integration-manager-controller/#bootstrapping-your-integration).

**Source:** `fluentform/app/Http/Controllers/IntegrationManagerController.php` (line 54)

---
Expand Down
4 changes: 3 additions & 1 deletion src/hooks/filters/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,9 @@ add_filter('fluentform/global_addons', function ($addons) use ($isEnabled) {

`apply_filters('fluentform/global_addons', $addons);`

This filter is located in FluentForm\app\Modules\AddOnModules -> showFluentAddOns()
This filter is located in FluentForm\App\Modules\AddOnModule -> getRegisteredAddOns()

If you extend `IntegrationManagerController`, `registerAdminHooks()` adds this filter for you — see [Bootstrapping your integration](/api/classes/integration-manager-controller/#bootstrapping-your-integration).

</explain-block>

Expand Down