Files
contact_form/Widgets/Form/Form.php
T

51 lines
1021 B
PHP
Executable File

<?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];
}
}