File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 3232
3333namespace ElementaryFramework \AirBubble \Attributes ;
3434
35+ use ElementaryFramework \AirBubble \Data \DataResolver ;
3536use ElementaryFramework \AirBubble \Util \EvalSandBox ;
3637
3738/**
@@ -55,10 +56,12 @@ class ConditionAttribute extends GenericAttribute
5556 /**
5657 * Evaluate the condition.
5758 *
59+ * @param DataResolver $resolver
60+ *
5861 * @return boolean
5962 */
60- public function evaluate (): bool
63+ public function evaluate (DataResolver $ resolver ): bool
6164 {
62- return EvalSandBox::eval ($ this ->getValue ());
65+ return EvalSandBox::eval ($ this ->getValue (), $ resolver );
6366 }
6467}
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ public function render(): ?\DOMNode
183183 foreach ($ this ->_conditionsMap as $ path => $ condition ) {
184184 if ($ condition instanceof ConditionAttribute) {
185185 $ condition ->parse ();
186- if ($ condition ->evaluate ()) {
186+ if ($ condition ->evaluate ($ this -> _template -> getResolver () )) {
187187 $ truePath = $ path ;
188188 break ;
189189 }
You can’t perform that action at this time.
0 commit comments