FEATURE #1422: prepare application for registering widgets

This commit is contained in:
Michal Kváček
2016-02-15 12:19:40 +01:00
parent 677acf3dcb
commit da3046c990
10 changed files with 243 additions and 1 deletions
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace App\Widgets\Contracts;
use App\Models\Widget;
use App\Models\WidgetType;
interface WidgetRenderer
{
/**
* Method used for displaying widget.
*
* This method renders some HTML code for displaying.
*
* @param object $settings
*
* @return mixed
*/
public static function render($settings);
/**
* Display form for creating new instance of widget
*
* @param WidgetType $type
*
* @return mixed
*/
public static function renderAddForm(WidgetType $type);
/**
* Display form for editing already existing widget
*
* @param Widget $widget
*
* @return mixed
*/
public static function renderEditForm(Widget $widget);
}