src/Controller/TestAction.php line 33

Open in your IDE?
  1. <?php
  2. namespace Slivki\Controller;
  3. use Doctrine\ORM\EntityManagerInterface;
  4. use Slivki\Dao\Beauty\MasterDaoInterface;
  5. use Slivki\Enum\Bonus\Bonus;
  6. use Slivki\Message\Command\Bonus\AddBonusCommand;
  7. use Slivki\Repository\Comment\CommentRepositoryInterface;
  8. use Slivki\Services\Mailer;
  9. use Slivki\Services\MeOnMap\GetCategoriesWithGeoLocationsResponseCacheService;
  10. use Slivki\Services\Offer\OfferCacheService;
  11. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  12. use Symfony\Bundle\TwigBundle\DependencyInjection\Configurator\EnvironmentConfigurator;
  13. use Symfony\Component\HttpFoundation\Request;
  14. use Symfony\Component\HttpFoundation\Response;
  15. use Symfony\Component\HttpKernel\KernelInterface;
  16. use Symfony\Component\Messenger\MessageBusInterface;
  17. use Symfony\Component\Routing\Annotation\Route;
  18. final class TestAction extends AbstractController
  19. {
  20.     public function __construct()
  21.     {
  22.     }
  23.     /** @Route("/atest") */
  24.     public function __invoke(Mailer $mailer): Response
  25.     {
  26.         $html $this->renderView('Slivki/emails/test.html.twig');
  27.         $mail $mailer->createMessage('event test'$html'html');
  28.         $mail->setFrom('info@slivki.by');
  29.         //$mail->setTo('igoradv@gmail.com');
  30.         $mail->setTo('igor.tovkun@hotmail.com');
  31.         $mailer->send($mail);
  32.         die();
  33.         return $this->render('empty.html.twig');
  34.     }
  35. }