# give/4.16.8.1/src/Framework/FormDesigns/ServiceProvider.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.8.1. 36 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.8.1/code/src/Framework/FormDesigns/ServiceProvider.php
- Raw: https://pluginprobe.com/plugins/give/4.16.8.1/raw/src/Framework/FormDesigns/ServiceProvider.php
- Modified: 2023-10-16T17:55:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.16.8.1/code/src/Framework/FormDesigns/ServiceProvider.php#L10-L20`.

```php
<?php

namespace Give\Framework\FormDesigns;

use Give\Framework\FormDesigns\Actions\RegisterFormDesigns;
use Give\Framework\FormDesigns\Registrars\FormDesignRegistrar;
use Give\Helpers\Hooks;
use Give\ServiceProviders\ServiceProvider as ServiceProviderInterface;

/**
 * @since 3.0.0
 */
class ServiceProvider implements ServiceProviderInterface
{
    /**
     * @inheritDoc
     */
    public function register()
    {
        give()->singleton(FormDesignRegistrar::class, function () {
            return new FormDesignRegistrar();
        });
    }

    /**
     * @inheritDoc
     */
    public function boot()
    {
        $registrar = give()->make(FormDesignRegistrar::class);

        Hooks::doAction('givewp_register_form_design', $registrar);
        Hooks::doAction('givewp_unregister_form_design', $registrar);
    }
}

```
