local/modules/VirtualProductDelivery/Hook/HookManager.php line 25

  1. <?php
  2. /*
  3.  * This file is part of the Thelia package.
  4.  * http://www.thelia.net
  5.  *
  6.  * (c) OpenStudio <info@thelia.net>
  7.  *
  8.  * For the full copyright and license information, please view the LICENSE
  9.  * file that was distributed with this source code.
  10.  */
  11. namespace VirtualProductDelivery\Hook;
  12. use Thelia\Core\Event\Hook\HookRenderEvent;
  13. use Thelia\Core\Hook\BaseHook;
  14. /**
  15.  * Class HookManager.
  16.  *
  17.  * @author Julien Chanséaume <jchanseaume@openstudio.fr>
  18.  */
  19. class HookManager extends BaseHook
  20. {
  21.     public function onAccountOrderAfterProducts(HookRenderEvent $event): void
  22.     {
  23.         $orderId $event->getArgument('order');
  24.         if (null !== $orderId) {
  25.             $render $this->render(
  26.                 'account-order-after-products.html',
  27.                 [
  28.                     'order_id' => $orderId,
  29.                 ]
  30.             );
  31.             $event->add($render);
  32.         }
  33.     }
  34. }