mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 01:49:05 +02:00
Added Doctrine Entities.
This commit is contained in:
parent
a0801afdbd
commit
160e826b51
20 changed files with 3400 additions and 1 deletions
30
src/Controller/HomepageController.php
Normal file
30
src/Controller/HomepageController.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
|
||||
use App\Entity\Attachment;
|
||||
use App\Entity\AttachmentType;
|
||||
use App\Entity\Category;
|
||||
use App\Entity\StructuralDBElement;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class HomepageController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* @Route("/")
|
||||
*/
|
||||
function homepage()
|
||||
{
|
||||
$repo = $this->getDoctrine()->getRepository(Category::class);
|
||||
|
||||
/** @var StructuralDBElement $attachment */
|
||||
$attachment = $repo->find(1);
|
||||
|
||||
dump($attachment, $attachment->getSubelements(false)->toArray());
|
||||
$response = "";
|
||||
return $this->render('base.html.twig');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue