Scope::class])] class Scope { /** * @ORM\Column(type="boolean", nullable=false, options={"default": true}) */ private bool $active = true; /** * @ORM\Id * * @ORM\Column(name="id", type="integer") * * @ORM\GeneratedValue(strategy="AUTO") */ #[Groups(['read', 'docgen:read'])] private ?int $id = null; /** * translatable names. * * @ORM\Column(type="json") * * @Context({"is-translatable": true}, groups={"docgen:read"}) */ #[Groups(['read', 'docgen:read'])] private array $name = []; /** * @var Collection * * @ORM\OneToMany( * targetEntity="Chill\MainBundle\Entity\RoleScope", * mappedBy="scope") * * @ORM\Cache(usage="NONSTRICT_READ_WRITE") */ private Collection $roleScopes; /** * Scope constructor. */ public function __construct() { $this->roleScopes = new ArrayCollection(); } public function addRoleScope(RoleScope $roleScope): self { $this->roleScopes->add($roleScope); return $this; } public function getId(): ?int { return $this->id; } public function getName(): array { return $this->name; } public function getRoleScopes(): Collection { return $this->roleScopes; } public function isActive(): bool { return $this->active; } public function setActive(bool $active): Scope { $this->active = $active; return $this; } /** * @return $this */ public function setName(array $name): self { $this->name = $name; return $this; } }