Skip to content

Commit

Permalink
Change twig function render_class_attribute name to render_callout_cl…
Browse files Browse the repository at this point in the history
…ass_attribute
  • Loading branch information
loevgaard committed Jan 26, 2024
1 parent 7e87e57 commit 66e8ff8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{# @var \Setono\SyliusCalloutPlugin\Model\CalloutInterface callout #}
<div class="{{ render_class_attribute(callout) }}" style="z-index: 999">{{ render_callout(callout) }}</div>
<div class="{{ render_callout_class_attribute(callout) }}" style="z-index: 999">{{ render_callout(callout) }}</div>
2 changes: 1 addition & 1 deletion src/Twig/CalloutExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function getFunctions(): array
return [
new TwigFunction('get_callouts', [CalloutRuntime::class, 'getCallouts']),
new TwigFunction('get_callout_assignment_delay', $this->getDelay(...)),
new TwigFunction('render_class_attribute', [CalloutRuntime::class, 'renderClassAttribute']),
new TwigFunction('render_callout_class_attribute', [CalloutRuntime::class, 'renderCalloutClassAttribute']),
new TwigFunction('render_callout', [CalloutRuntime::class, 'renderCallout'], ['is_safe' => ['html']]),
];
}
Expand Down
2 changes: 1 addition & 1 deletion src/Twig/CalloutRuntime.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function getCallouts(ProductInterface $product, string $element = null):
return $callouts;
}

public function renderClassAttribute(CalloutInterface $callout): string
public function renderCalloutClassAttribute(CalloutInterface $callout): string
{
return $this->cssClassBuilder->build($callout);
}
Expand Down

0 comments on commit 66e8ff8

Please sign in to comment.