FEATURE #1422: prepare application for registering widgets
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
namespace App\Widgets\Contracts;
|
||||
|
||||
use App\Http\Requests\Request;
|
||||
use App\Models\Widget;
|
||||
|
||||
interface PublicWidget
|
||||
{
|
||||
/**
|
||||
* Name getter
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getName();
|
||||
|
||||
/**
|
||||
* Getter for description
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getDescription();
|
||||
|
||||
/**
|
||||
* Getter for presenter/renderer of this widget
|
||||
*
|
||||
* @return WidgetRenderer
|
||||
*/
|
||||
public static function getPresenter();
|
||||
|
||||
/**
|
||||
* @param Widget $widget
|
||||
* @param Request $request
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function save(Widget $widget, Request $request);
|
||||
|
||||
/**
|
||||
* Function for installing given widget
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function install();
|
||||
|
||||
/**
|
||||
* Function for uninstalling widget
|
||||
*/
|
||||
public static function uninstall();
|
||||
}
|
||||
Reference in New Issue
Block a user