51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
<?php namespace Modules\ContactForm\Providers;
|
|
|
|
use App\CMS\Modules\ServiceProviders\ServiceProvider;
|
|
use Modules\ContactForm\Handlers\ContactForm;
|
|
use Modules\ContactForm\Pipeline\SavePipeline\SaveContactInformation;
|
|
use Modules\ContactForm\Widgets\Address\Address;
|
|
use Modules\ContactForm\Widgets\Form\Form;
|
|
|
|
class ContactFormServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Boot the application events.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
parent::boot();
|
|
$this->registerWidgets();
|
|
|
|
app('saveContentPipeline')->add(SaveContactInformation::class);
|
|
}
|
|
|
|
/**
|
|
* Register the service provider.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
}
|
|
|
|
private function registerWidgets()
|
|
{
|
|
$registrator = $this->app->make('registerWidget');
|
|
|
|
$registrator->register(Address::class, null, ContactForm::getModuleId());
|
|
$registrator->register(Form::class, null, ContactForm::getModuleId());
|
|
}
|
|
|
|
protected function setModuleAlias()
|
|
{
|
|
$this->alias = 'contactform';
|
|
}
|
|
|
|
protected function setModulePath()
|
|
{
|
|
$this->path = __DIR__;
|
|
}
|
|
}
|