src/Entity/ResourcesCategories.php line 13
<?phpnamespace App\Entity;use App\Repository\ResourcesCategoriesRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/*** @ORM\Entity(repositoryClass=ResourcesCategoriesRepository::class)*/class ResourcesCategories{/*** @ORM\Id()* @ORM\GeneratedValue()* @ORM\Column(type="integer")*/private $id;/*** @ORM\Column(type="string", length=255)*/private $label;/*** @ORM\Column(type="text", nullable=true)*/private $description;/*** @ORM\OneToMany(targetEntity=Resources::class, mappedBy="category", orphanRemoval=true)*/private $resources;/*** @ORM\Column(type="string", length=255, nullable=true)*/private $slug;public function __construct(){$this->faqs = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getLabel(): ?string{return $this->label;}public function setLabel(string $label): self{$this->label = $label;return $this;}public function getDescription(): ?string{return $this->description;}public function setDescription(?string $description): self{$this->description = $description;return $this;}public function getResources(): Collection{return $this->resources;}public function addResource(Resources $resource): self{if (!$this->resources->contains($resource)) {$this->resources[] = $resource;$resource->setCategory($this);}return $this;}public function removeResource(Resources $resource): self{if ($this->resources->contains($resource)) {$this->resources->removeElement($resource);// set the owning side to null (unless already changed)if ($resource->getCategory() === $this) {$resource->setCategory(null);}}return $this;}public function __toString(){return $this->label;}public function getSlug(): ?string{return $this->slug;}public function setSlug(?string $slug): self{$this->slug = $slug;return $this;}}