src/Entity/CartItemLesson.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CartItemLessonRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassCartItemLessonRepository::class)]
  6. class CartItemLesson extends CartItem
  7. {
  8.     #[ORM\ManyToOne(targetEntityLesson::class, inversedBy'cartItemLessons')]
  9.     private $lesson;
  10.     public function getName(): ?string
  11.     {
  12.         return parent::getName() ?? 'Cotisation';
  13.     }
  14.     public function getLesson(): ?Lesson
  15.     {
  16.         return $this->lesson;
  17.     }
  18.     public function setLesson(?Lesson $lesson): self
  19.     {
  20.         $this->lesson $lesson;
  21.         return $this;
  22.     }
  23. }