Skip to content

Commit c6b1d5c

Browse files
Restore context
1 parent 8ee0019 commit c6b1d5c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/StatamicBladeViewData.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
class StatamicBladeViewData {
88

9+
public $context;
910
public $page;
1011
public $site;
1112
public $globalSets = [];
@@ -22,11 +23,21 @@ public function __construct()
2223

2324
public function init(array $viewData) {
2425

26+
$this->context = $viewData;
2527
$this->page = $viewData['page'];
2628
$this->site = $viewData['site'];
2729
$this->globalSets = $this->initGlobalSets($viewData);
2830

2931
}
32+
33+
/**
34+
* Return the laravel variable
35+
* that contains all view data
36+
* usually named $__data.
37+
*/
38+
public function context() {
39+
return $this->context;
40+
}
3041

3142
public function page() {
3243
return $this->page;

0 commit comments

Comments
 (0)