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.     /**
  36.      * @var Employee[]|ArrayCollection<int, Employee>
  37.      *
  38.      * @ORM\ManyToMany(targetEntity="App\Entity\System\Employee", mappedBy="routes")
  39.      */
  40.     private $employees;
  41.     public function __construct()
  42.     {
  43.         $this->roles = new ArrayCollection();
  44.         $this->employees = new ArrayCollection();
  45.     }
  46.     public function getId(): int
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getRoute(): string
  51.     {
  52.         return $this->route;
  53.     }
  54.     public function setRoute(string $route): AdminAcl
  55.     {
  56.         $this->route $route;
  57.         return $this;
  58.     }
  59.     /**
  60.      * @return Role[]|ArrayCollection<int, Role>
  61.      */
  62.     public function getRoles()
  63.     {
  64.         return $this->roles;
  65.     }
  66.     /**
  67.      * @param Role[]|ArrayCollection<int, Role> $roles
  68.      *
  69.      * @return AdminAcl
  70.      */
  71.     public function setRoles($roles)
  72.     {
  73.         $this->roles $roles;
  74.         return $this;
  75.     }
  76.     /**
  77.      * @return Employee[]|ArrayCollection<int, Employee>
  78.      */
  79.     public function getEmployees()
  80.     {
  81.         return $this->employees;
  82.     }
  83.     /**
  84.      * @param Employee[]|ArrayCollection<int, Employee> $employees
  85.      *
  86.      * @return AdminAcl
  87.      */
  88.     public function setEmployees($employees)
  89.     {
  90.         $this->employees $employees;
  91.         return $this;
  92.     }
  93. }