Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3928

Sylius BitBag Elasticsearch how to implement Site-wide search on start page

$
0
0

i want to implement in my Sylius project the BitBag Elasticsearch - but Site-Wide.

BBES Site-Wide-Search

But i don't know how to get the form in my homepage controller. Is there any help for me?

My homepage controller so far:

<?php

declare(strict_types=1);

namespace App\Controller\Shop;

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
use Symfony\Component\HttpFoundation\Response;

final class HomepageController  extends AbstractController
{
    /** @var EngineInterface */
    private $templatingEngine;

    public function __construct(EngineInterface $templatingEngine)
    {
        $this->templatingEngine = $templatingEngine;
    }

    public function indexAction(): Response
    {
        $em = $this->getDoctrine()->getManager();
        $games = $em->getRepository('App\Entity\Extras\Games')->findNextOnesLimited(10);
        $medals = $em->getRepository('App\Entity\Extras\Medalsuccess')->find(1);

        return $this->templatingEngine->renderResponse(
            '@SyliusShop/Homepage/index.html.twig', [
                'games' => $games,
                'medals' => $medals
            ]
            );
    }
}

Viewing all articles
Browse latest Browse all 3928

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>