FEATURE: move contactform into own repository
This commit is contained in:
Executable
+51
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
namespace Modules\ContactForm\Widgets\Form;
|
||||
|
||||
use App\CMS\Contracts\Widgets\PublicWidget;
|
||||
use App\CMS\Contracts\Widgets\WidgetRenderer;
|
||||
use App\Http\Requests\Request;
|
||||
use App\Models\Widgets\Widget;
|
||||
|
||||
class Form implements PublicWidget
|
||||
{
|
||||
/**
|
||||
* Name getter
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getName()
|
||||
{
|
||||
return 'contactform::admin/widgets.form.name';
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for description
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getDescription()
|
||||
{
|
||||
return 'contactform::admin/widgets.form.description';
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for presenter/renderer of this widget
|
||||
*
|
||||
* @return WidgetRenderer
|
||||
*/
|
||||
public static function getPresenter()
|
||||
{
|
||||
return Presenter::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Widget $widget
|
||||
* @param \stdClass $data
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function save(Request $data)
|
||||
{
|
||||
return ['contactFormId' => $data->contactFormId];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user