50 lines
1.2 KiB
PHP
50 lines
1.2 KiB
PHP
<?php namespace Modules\ContactForm\Providers;
|
|
|
|
use App\Providers\ModuleServiceProvider;
|
|
use Modules\ContactForm\Handlers\ContactForm;
|
|
use Modules\ContactForm\Widgets\Address\Address;
|
|
use Modules\ContactForm\Widgets\Form\Form;
|
|
|
|
class ContactFormServiceProvider extends ModuleServiceProvider
|
|
{
|
|
/**
|
|
* Boot the application events.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
parent::boot();
|
|
$this->registerWidgets();
|
|
}
|
|
|
|
/**
|
|
* Register the service provider.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
$registrator = $this->app->make('registerSettingsExtension');
|
|
$registrator->register('contactForm', 'contactform::module.name', 'contactform::admin.settings.form');
|
|
}
|
|
|
|
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__;
|
|
}
|
|
}
|