src/Entity/Link.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LinkRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\HttpFoundation\File\File;
  6. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. /**
  9.  * @Vich\Uploadable
  10.  */
  11. #[ORM\Entity(repositoryClassLinkRepository::class)]
  12. class Link
  13. {
  14.     #[ORM\Id]
  15.     #[ORM\GeneratedValue]
  16.     #[ORM\Column(type'integer')]
  17.     private $id;
  18.     #[ORM\Column(type'string'length255)]
  19.     private $name;
  20.     #[ORM\Column(type'string'length255)]
  21.     private $url;
  22.     #[ORM\ManyToOne(targetEntityWebsiteNews::class, inversedBy'links')]
  23.     private $websiteNews;
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getName(): ?string
  29.     {
  30.         return $this->name;
  31.     }
  32.     public function setName(?string $name): self
  33.     {
  34.         $this->name $name;
  35.         return $this;
  36.     }
  37.     public function getUrl(): ?string
  38.     {
  39.         return $this->url;
  40.     }
  41.     public function setUrl(?string $url): self
  42.     {
  43.         $this->url $url;
  44.         return $this;
  45.     }
  46.     public function getWebsiteNews(): ?WebsiteNews
  47.     {
  48.         return $this->websiteNews;
  49.     }
  50.     public function setWebsiteNews(?WebsiteNews $websiteNews): self
  51.     {
  52.         $this->websiteNews $websiteNews;
  53.         return $this;
  54.     }
  55. }