We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea85a34 commit 90c43b8Copy full SHA for 90c43b8
src/WebApp/Component/LazyInitializer.php
@@ -0,0 +1,9 @@
1
+<?php
2
+
3
+namespace WebApp\Component;
4
5
+/** Component that has a special method that will be called immediately before rendering */
6
+interface LazyInitializer {
7
8
+ public function lazyInit();
9
+}
src/WebApp/Theme.php
@@ -107,6 +107,9 @@ public function renderComponent($component) {
107
}
108
return $rc;
109
} else if (is_object($component)) {
110
+ if (is_a($component, 'WebApp\\Component\\LazyInitializer')) {
111
+ $component->lazyInit();
112
+ }
113
return $this->getRenderer($component)->render();
114
115
return '';
0 commit comments