mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-10-12 10:09:58 +00:00
31 lines
755 B
PHP
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;
|
|
}
|