Files
BookStack/app/View/ViewBlockInterface.php
T
Dan Brown 97fe7cca9d View Blocks: Added base implementation class
Also removed unused imports from app/ classes.
2026-09-21 13:03:18 +01:00

31 lines
755 B
PHP

<?php
namespace BookStack\View;
interface ViewBlockInterface
{
/**
* Get the unique ID for this block.
*/
public static function getId(): string;
/**
* Get the label for this block.
*/
public static function getLabel(): string;
/**
* Get the view to render for this block.
* This is provided with the existing parent view data to allow the view used to be
* dynamic based on the context of its environment.
*/
public function getView(array $viewData): string;
/**
* Specify the data to pass to the view on render.
* This is provided with the existing parent view data.
* @return array<string, mixed>
*/
public function getViewData(array $viewData): array;
}