FEATURE: move contactform into own repository
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?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__;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user