FEATURE: move contactform into own repository

This commit is contained in:
Michal Kváček
2017-08-22 20:17:39 +02:00
commit 6b0509a1db
36 changed files with 1039 additions and 0 deletions
+50
View File
@@ -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__;
}
}