v0 ninegate
Some checks failed
Cadoles/nineskeletor/pipeline/head There was a failure building this commit
Some checks failed
Cadoles/nineskeletor/pipeline/head There was a failure building this commit
This commit is contained in:
@ -5,15 +5,27 @@ namespace App\Controller;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
class HomeController extends AbstractController
|
||||
{
|
||||
public function home(Request $request)
|
||||
public function home(Request $request,ManagerRegistry $em)
|
||||
{
|
||||
if ($request->getSession()->get('fgforceconnect') && !$this->getUser()) {
|
||||
return $this->redirectToRoute('app_login');
|
||||
}
|
||||
|
||||
$em->getRepository("App\Entity\Item")->getUserItems($this->getUser(),$bookmarks,$items,$itemscategorys);
|
||||
return $this->render('Home/page.html.twig', [
|
||||
'useheader' => true,
|
||||
'usemenu' => false,
|
||||
'usesidebar' => false,
|
||||
'maxsize' => 1000,
|
||||
'bookmarks' => $bookmarks,
|
||||
'items' => $items,
|
||||
'itemcategorys' => $itemscategorys,
|
||||
]);
|
||||
|
||||
if (!$this->getUser()) {
|
||||
return $this->render('Home/home.html.twig', [
|
||||
'useheader' => true,
|
||||
|
Reference in New Issue
Block a user