Skip to content

Commit

Permalink
Fix parsing of Antlers variables
Browse files Browse the repository at this point in the history
  • Loading branch information
aerni committed Jul 8, 2024
1 parent 3f07478 commit a11f12d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/View/AugmentedCascade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,20 @@ public function keys(): array
->unique()->sort()->values()->all();
}

protected function wrapValue($value, $handle)
protected function wrapDataMethodInvokable(string $method, string $handle)
{
return new Value(
$value,
fn () => $this->data->$method(),
$handle,
app(CascadeFieldtype::class), // Add a dummy fieldtype to enable Value objects to parse Antlers.
$this->data
);
}

protected function wrapDeferredValue($handle)
{
return new Value(
fn () => $this->getFromData($handle),
$handle,
app(CascadeFieldtype::class), // Add a dummy fieldtype to enable Value objects to parse Antlers.
$this->data
Expand Down

0 comments on commit a11f12d

Please sign in to comment.