Add 'plugi-core/' from commit '6c478c54d048ab2fd5af4e8e79074153fb594c16'
git-subtree-dir: plugi-core git-subtree-mainline:d4c734cdbdgit-subtree-split:6c478c54d0
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace Plugi\Contracts;
|
||||
|
||||
interface PageBuilderContract
|
||||
{
|
||||
/**
|
||||
* Process the current GET or POST request and redirect or render the requested page.
|
||||
*
|
||||
* @param $route
|
||||
* @param $action
|
||||
* @param PageContract|null $page
|
||||
*/
|
||||
public function handleRequest($route, $action, PageContract $page = null);
|
||||
|
||||
/**
|
||||
* Render the given page inside the PageBuilder.
|
||||
*
|
||||
* @param PageContract $page
|
||||
*/
|
||||
public function renderPageBuilder(PageContract $page);
|
||||
|
||||
/**
|
||||
* Render the given page.
|
||||
*
|
||||
* @param PageContract $page
|
||||
* @param null $language
|
||||
* @return string
|
||||
*/
|
||||
public function renderPage(PageContract $page, $language = null): string;
|
||||
|
||||
/**
|
||||
* Update the given page with the given data (an array of html blocks)
|
||||
*
|
||||
* @param PageContract $page
|
||||
* @param $data
|
||||
* @return bool|object|null
|
||||
*/
|
||||
public function updatePage(PageContract $page, $data);
|
||||
|
||||
/**
|
||||
* Get or set custom css for customizing layout of the page builder.
|
||||
*
|
||||
* @param string|null $css
|
||||
* @return string
|
||||
*/
|
||||
public function customStyle(string $css = null);
|
||||
|
||||
/**
|
||||
* Get or set custom scripts for customizing behaviour of the page builder.
|
||||
*
|
||||
* @param string $location head|body
|
||||
* @param string|null $scripts
|
||||
* @return string
|
||||
*/
|
||||
public function customScripts(string $location, string $scripts = null);
|
||||
|
||||
/**
|
||||
* Set a theme for the page builder.
|
||||
*
|
||||
* @param ThemeContract $theme
|
||||
*/
|
||||
public function setTheme(ThemeContract $theme);
|
||||
}
|
||||
Reference in New Issue
Block a user