FEATURE: add widget for social buttons
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
namespace App\CMS\Widgets\SocialButtons;
|
||||
|
||||
use App\CMS\Contracts\Widgets\PublicWidget;
|
||||
use App\CMS\Widgets\Exceptions\MissingParameterException;
|
||||
use App\Http\Requests\Request;
|
||||
use App\Models\Widgets\Widget;
|
||||
|
||||
class SocialButtons implements PublicWidget
|
||||
{
|
||||
/**
|
||||
* Name getter
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getName()
|
||||
{
|
||||
return 'widgets/socialButtons.widgetName';
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for description
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getDescription()
|
||||
{
|
||||
return 'widgets/socialButtons.widgetDescription';
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for presenter/renderer of this widget
|
||||
*
|
||||
* @return WidgetRenderer
|
||||
*/
|
||||
public static function getPresenter()
|
||||
{
|
||||
return Presenters\SocialButtons::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $data
|
||||
*
|
||||
* @return array
|
||||
* @throws MissingParameterException
|
||||
*/
|
||||
public static function save(Request $data)
|
||||
{
|
||||
//if (!isset($data->code) || empty($data->code)) {
|
||||
// throw new MissingParameterException('code');
|
||||
//}
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user