src/Entity/System/AdminAcl.php line 15

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\System;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\System\AdminAclRepository")
  8.  *
  9.  * @ORM\Table
  10.  */
  11. class AdminAcl
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Id
  17.      *
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      *
  20.      * @ORM\Column(type="integer")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @var string
  25.      *
  26.      * @ORM\Column(type="string", length=200, nullable=false, unique=true)
  27.      */
  28.     private string $route;
  29.     /**
  30.      * @var Role[]|ArrayCollection<int, Role>
  31.      *
  32.      * @ORM\ManyToMany(targetEntity="App\Entity\System\Role", mappedBy="routes")
  33.      */
  34.     private $roles;
  35.     public function __construct()
  36.     {
  37.         $this->roles = new ArrayCollection();
  38.     }
  39.     public function getId(): int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getRoute(): string
  44.     {
  45.         return $this->route;
  46.     }
  47.     public function setRoute(string $route): AdminAcl
  48.     {
  49.         $this->route $route;
  50.         return $this;
  51.     }
  52.     /**
  53.      * @return Role[]|ArrayCollection<int, Role>
  54.      */
  55.     public function getRoles()
  56.     {
  57.         return $this->roles;
  58.     }
  59.     /**
  60.      * @param Role[]|ArrayCollection<int, Role> $roles
  61.      *
  62.      * @return AdminAcl
  63.      */
  64.     public function setRoles($roles)
  65.     {
  66.         $this->roles $roles;
  67.         return $this;
  68.     }
  69. }