49 lines
888 B
PHP
49 lines
888 B
PHP
<?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 \stdClass $data
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public static function save(Widget $widget, \stdClass $data);
|
|
|
|
/**
|
|
* Function for installing given widget
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public static function install();
|
|
|
|
/**
|
|
* Function for uninstalling widget
|
|
*/
|
|
public static function uninstall();
|
|
} |