Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Cosray\Contract; |
| 6 | |
| 7 | use Cosray\Block\RenderContext; |
| 8 | use Cosray\Value\Block as BlockValue; |
| 9 | |
| 10 | /** |
| 11 | * A block type usable inside a Blocks field: a class whose Field |
| 12 | * properties declare the block's schema, like an entry type, plus the |
| 13 | * frontend render. Typed properties are schema declarations and are |
| 14 | * never assigned; `render()` reads the values off the block value. |
| 15 | */ |
| 16 | interface Block |
| 17 | { |
| 18 | public function render(BlockValue $block, RenderContext $ctx): string; |
| 19 | } |