You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Creates a root view. A root can have subsidiary "child views". So the root view is the very "inner" part of a page, while child views are outer parts like a header, footer, menu...
@@ -66,13 +88,23 @@ public static function createChild(string $name, $parentView, array $data = [])
66
88
return$view;
67
89
}
68
90
69
-
/** @return \EzMvc\View */
91
+
/**
92
+
* Returns the root view for a child view.
93
+
*
94
+
* @return View
95
+
*/
70
96
publicfunctiongetRootView()
71
97
{
72
98
return$this->parentViews[0];
73
99
}
74
100
75
-
/** @return \EzMvc\View */
101
+
/**
102
+
* Returns the parent view for this child view. This can be the root view or other child views in the hierachy.
103
+
*
104
+
* @param int $level Specifiy this level to get a parent view based on the hierarchy of your root + child views. 0 = direct parent, 1 = parent of parent,...
105
+
*
106
+
* @return View
107
+
*/
76
108
publicfunctiongetParentView(int$level = 0)
77
109
{
78
110
$c = count($this->parentViews) - 1;
@@ -81,6 +113,11 @@ public function getParentView(int $level = 0)
0 commit comments