mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-10-12 10:09:58 +00:00
So that their metadata can be read without having to create instances and fullfill dependancy injection just to list. Also added title to interface prefs page.
30 lines
683 B
PHP
30 lines
683 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.
|
|
* Is provided with the existing parent view data.
|
|
*/
|
|
public function getView(array $viewData): string;
|
|
|
|
/**
|
|
* Specify the data to pass to the view on render.
|
|
* Is provided with the existing parent view data and the original request.
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function withData(array $viewData): array;
|
|
}
|