V-Beta-1.0.0

Vision is out of alpha !
This commit is contained in:
Xbird
2022-02-02 17:46:29 +01:00
parent 797bf35b47
commit 9f22f5b1ee
2297 changed files with 278438 additions and 76 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace App\Controller;
use App\Repository\DocumentRepository;
use App\Repository\DirectoryRepository;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
class HomeController extends AbstractController
{
#[Route('/', name: 'home')]
public function home(
DocumentRepository $DocumentRepository,
DirectoryRepository $DirectoryRepository
): Response {
return $this->render('home/home.html.twig', [
'documents' =>
$DocumentRepository ->listForUser($this->getUser())
->limit(10)
->order(['createdAt' => 'DESC'])
->getResult(),
'announces' =>
$DocumentRepository ->listForUser($this->getUser())
->limitType('announce')
->limit(3)
->order(['createdAt' => 'DESC'])
->getResult(),
'wanted' =>
$DirectoryRepository->list()->notDead()->wanted()->getResult(),
'controller_name' => 'HomeController',
]);
}
}