FEATURE: move default Handler::render() into parent class
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
namespace App\Handlers;
|
||||
|
||||
use App\Handlers\Contracts\AppHandler;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Content;
|
||||
|
||||
/**
|
||||
@@ -29,6 +30,19 @@ abstract class Handler extends BaseHandler implements AppHandler
|
||||
return History::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render given module into visitor area.
|
||||
*
|
||||
* @param Content $content DB model from table contents
|
||||
* @param array $parameters parameters used for modifications/custom settings of given model
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function render(Content $content, $parameters)
|
||||
{
|
||||
return Controller::VisitorsView($content->template, ['page' => $content, 'extra' => $parameters]);
|
||||
}
|
||||
|
||||
public static function getExtendedFormSections()
|
||||
{
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user