Introduced empty PartRepository for later use.

This commit is contained in:
Jan Böhmer 2019-02-23 22:52:48 +01:00
parent e9325bfb89
commit 7dbdb959b8
3 changed files with 22 additions and 4 deletions

View file

@ -6,6 +6,7 @@ namespace App\Controller;
use App\Entity\Attachment;
use App\Entity\AttachmentType;
use App\Entity\Category;
use App\Entity\Part;
use App\Entity\StructuralDBElement;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
@ -18,12 +19,12 @@ class HomepageController extends AbstractController
*/
function homepage()
{
$repo = $this->getDoctrine()->getRepository(Category::class);
$repo = $this->getDoctrine()->getRepository(Part::class);
/** @var StructuralDBElement $attachment */
$attachment = $repo->find(1);
dump($attachment, $attachment->getSubelements(false)->toArray());
dump($attachment);
$response = "";
return $this->render('base.html.twig');
}