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\Node\Wrapper; |
| 8 | |
| 9 | interface ViewContext |
| 10 | { |
| 11 | /** |
| 12 | * Extra template variables for this node's view. |
| 13 | * |
| 14 | * Runs whenever the node is rendered — at its own url path and when it |
| 15 | * is embedded through `$cms->render()`. The wrapper is the same object |
| 16 | * the template receives, so view preparation can move here unchanged. |
| 17 | * |
| 18 | * Returned keys are merged over the base context (`node`, `cms`, |
| 19 | * `locale`, `request`, ...), so reusing one of those names replaces it. |
| 20 | * |
| 21 | * @return array<string, mixed> |
| 22 | */ |
| 23 | public function viewContext(Wrapper $node): array; |
| 24 | } |