FEATURE: prepare class structure for menu widget.
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
namespace App\Widgets\Menu;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
use App\Widgets\Contracts\WidgetRenderer;
|
||||
use App\Widgets\Widget;
|
||||
|
||||
class Menu extends Widget
|
||||
{
|
||||
/**
|
||||
* Name getter
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getName()
|
||||
{
|
||||
return 'widgets/menu.name';
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for description
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getDescription()
|
||||
{
|
||||
return 'widgets/menu.description';
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for presenter/renderer of this widget
|
||||
*
|
||||
* @return WidgetRenderer
|
||||
*/
|
||||
public static function getPresenter()
|
||||
{
|
||||
return Presenters\Menu::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \App\Models\Widget $widget
|
||||
* @param Request $request
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function save(\App\Models\Widget $widget, Request $request)
|
||||
{
|
||||
// TODO: Implement save() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Function for installing given widget
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function install()
|
||||
{
|
||||
// TODO: Implement install() method.
|
||||
}
|
||||
|
||||
/**
|
||||
* Function for uninstalling widget
|
||||
*/
|
||||
public static function uninstall()
|
||||
{
|
||||
// TODO: Implement uninstall() method.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user