app/Plugin/Instagram42/Controller/Block/InstagramController.php line 33

Open in your IDE?
  1. <?php
  2. namespace Plugin\Instagram42\Controller\Block;
  3. use Eccube\Controller\AbstractController;
  4. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  5. use Symfony\Component\Routing\Annotation\Route;
  6. use Plugin\Instagram42\Repository\InstagramRepository;
  7. class InstagramController extends AbstractController
  8. {
  9.     /**
  10.      * @var InstagramRepository
  11.      */
  12.     protected $instagramRepository;
  13.     /**
  14.      * ConfigController constructor.
  15.      *
  16.      * @param InstagramRepository $instagramRepository
  17.      */
  18.     public function __construct(InstagramRepository $instagramRepository)
  19.     {
  20.         $this->instagramRepository $instagramRepository;
  21.     }
  22.     /**
  23.      * @Route("/block/instagram", name="block_plg_instagram")
  24.      * @Template("Block/plg_instagram.twig")
  25.      */
  26.     public function index(): array
  27.     {
  28.         $Instagram $this->instagramRepository->get();
  29.         return compact('Instagram');
  30.     }
  31. }