mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 17:39:06 +02:00
Added a basic show part info with new design. Not finished yet...
This commit is contained in:
parent
f8bd1458d3
commit
f0bea8ff4d
22 changed files with 7883 additions and 25 deletions
39
src/Controller/PartController.php
Normal file
39
src/Controller/PartController.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: janhb
|
||||
* Date: 24.02.2019
|
||||
* Time: 13:00
|
||||
*/
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
|
||||
use App\Entity\Part;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class PartController extends AbstractController
|
||||
{
|
||||
|
||||
/**
|
||||
* @Route("/part/{id}/info")
|
||||
* @Route("/part/{id}")
|
||||
*/
|
||||
function show(int $id)
|
||||
{
|
||||
$repo = $this->getDoctrine()->getRepository(Part::class);
|
||||
|
||||
/** @var Part $part */
|
||||
$part = $repo->find($id);
|
||||
|
||||
dump($part);
|
||||
|
||||
return $this->render('show_part_info.html.twig',
|
||||
[
|
||||
"part" => $part
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue