src/Controller/MainController.php line 32

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\Session\SessionInterface;
  5. use Symfony\Component\Routing\Annotation\Route;
  6. use App\Lib\Services\Enovia;
  7. class MainController extends YAITSController
  8. {
  9.     /**F
  10.      * @var Enovia
  11.      */
  12.     private $enovia;
  13.     /**
  14.      * MainController constructor.
  15.      * @param SessionInterface $session
  16.      * @param Enovia $enovia
  17.      */
  18.     public function __construct(SessionInterface $sessionEnovia $enovia)
  19.     {
  20.         $this->enovia $enovia;
  21.         parent::__construct($session);
  22.     }
  23.     /**
  24.      * @Route("/", name="main")
  25.      */
  26.     public function index()
  27.     {
  28.         $me $this->session->get("me");
  29.         $cs $this->enovia->getCollabspaces($this->getParameter("tenant"));
  30.         $this->session->set("cs"$cs->items);
  31.        // $this->enovia->uploadFileTo3DDrive($this->getParameter("tenant"), "67-00100-FCS-20200415-145834.log");
  32.         $parameters $this->conf->getProperty("parameters");
  33.         $bigram $me->firstName[0] . $me->lastName[0];
  34.         return $this->render('main/index.html.twig', [
  35.             'bigram' => $bigram,
  36.             'multiuser' => $parameters["multiuser"]
  37.         ]);
  38.     }
  39. }