This repository was archived by the owner on Sep 12, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +26
-4
lines changed
Classes/PackageFactory/AtomicFusion/FusionObjects Expand file tree Collapse file tree 1 file changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -36,12 +36,11 @@ class ComponentImplementation extends ArrayImplementation
3636 protected $ ignoreProperties = ['__meta ' , 'renderer ' ];
3737
3838 /**
39- * Evaluate the fusion-keys and transfer the result into the context as ``props``
40- * afterwards evaluate the ``renderer`` with this context
39+ * Get the component props as an associative array
4140 *
42- * @return void|string
41+ * @return array
4342 */
44- public function evaluate ()
43+ public function getProps ()
4544 {
4645 $ sortedChildFusionKeys = $ this ->sortNestedFusionKeys ();
4746
@@ -54,6 +53,17 @@ public function evaluate()
5453 }
5554 }
5655
56+ return $ props ;
57+ }
58+
59+ /**
60+ * Render the component with the given props
61+ *
62+ * @param array $props
63+ * @return void|string
64+ */
65+ public function renderComponent (array $ props )
66+ {
5767 $ context = $ this ->runtime ->getCurrentContext ();
5868 $ context ['props ' ] = $ props ;
5969 $ this ->runtime ->pushContextArray ($ context );
@@ -62,4 +72,16 @@ public function evaluate()
6272
6373 return $ result ;
6474 }
75+
76+ /**
77+ * Evaluate the fusion-keys and transfer the result into the context as ``props``
78+ * afterwards evaluate the ``renderer`` with this context
79+ *
80+ * @return void|string
81+ */
82+ public function evaluate ()
83+ {
84+ $ props = $ this ->getProps ();
85+ return $ this ->renderComponent ($ props );
86+ }
6587}
You can’t perform that action at this time.
0 commit comments