Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
24 | public function addScript(ResourceControllerEvent $event): void |
||
25 | { |
||
26 | $product = $event->getSubject(); |
||
27 | |||
28 | if (!$product instanceof ProductInterface) { |
||
29 | return; |
||
30 | } |
||
31 | |||
32 | $this->tagBag->addTag( |
||
33 | (new TwigTag('@SetonoSyliusStrandsPlugin/Tag/item_visited.js.twig', ['product' => $product])) |
||
34 | ->setSection(TagInterface::SECTION_BODY_END) |
||
35 | ->setName(Tags::TAG_ITEM_VISITED) |
||
36 | ); |
||
39 |