i'm working on a small app for editing quotes a quotes is related to a client which is either a company either a person.
I've two tables (entities), one contains companies, the second persons. i'm trying to use easyadmin 4 to administrate the app. So I've created a quote entity without any details in it for now.
<?php
namespace App\Entity;
use App\Repository\DevisRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: QuotesRepository::class)]
class Quotes
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
public function getId(): ?int
{
return $this->id;
}
}
I've created automaticaly my QuoteCrudCrontroller (php bin/console make:admin:crud)
<?php
namespace App\Controller\Admin;
use App\Entity\Quotes;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
class QuotesCrudController extends AbstractCrudController
{
public static function getEntityFqcn(): string
{
return Quotes::class;
}
/*
public function configureFields(string $pageName): iterable
{
return [
IdField::new('id'),
TextField::new('title'),
TextEditorField::new('description'),
];
}
*/
}
I tried to create an Client entity so that Company and Person entities would inherit from it but, in that case, inside client entity, client class has to be abstract and can't be instantiate
I'm stuck here. I don't know where to search.
Could someone help me ?
Thanks