adapt admin panel to handle offerings

This commit is contained in:
Jannis Portmann 2021-04-24 17:55:48 +02:00
parent 307954d46f
commit d3a26a57ac
2 changed files with 27 additions and 0 deletions

View file

@ -3,6 +3,7 @@
namespace App\Controller\Admin;
use App\Entity\User;
use App\Entity\Offering;
use EasyCorp\Bundle\EasyAdminBundle\Config\Dashboard;
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractDashboardController;
@ -30,5 +31,6 @@ class DashboardController extends AbstractDashboardController
yield MenuItem::linktoRoute('Back to the website', 'fas fa-arrow-left', 'homepage');
yield MenuItem::linktoDashboard('Dashboard', 'fa fa-home');
yield MenuItem::linkToCrud('User', 'fas fa-user', User::class);
yield MenuItem::linkToCrud('Offering', 'fas fa-seedling', Offering::class);
}
}

View file

@ -0,0 +1,25 @@
<?php
namespace App\Controller\Admin;
use App\Entity\Offering;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
class OfferingCrudController extends AbstractCrudController
{
public static function getEntityFqcn(): string
{
return Offering::class;
}
/*
public function configureFields(string $pageName): iterable
{
return [
IdField::new('id'),
TextField::new('title'),
TextEditorField::new('description'),
];
}
*/
}