src/Entity/SsoSistema.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SsoSistemaRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Trikoder\Bundle\OAuth2Bundle\Model\Client;
  8. /**
  9.  * @ORM\Entity(repositoryClass=SsoSistemaRepository::class)
  10.  */
  11. class SsoSistema
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\ManyToOne(targetEntity=Client::class)
  21.      * @ORM\JoinColumn(name="client_identifier", referencedColumnName="identifier")
  22.      */
  23.     private $clienteOauth2;
  24.     /**
  25.      * @ORM\Column(type="string", length=200)
  26.      */
  27.     private $nombre;
  28.     /**
  29.      * @ORM\Column(type="text", nullable=true)
  30.      */
  31.     private $descripcion;
  32.     /**
  33.      * @ORM\OneToMany(targetEntity=SsoUsuarioSistema::class, mappedBy="sistema", orphanRemoval=true)
  34.      */
  35.     private $ssoUsuarioSistemas;
  36.     /**
  37.      * @ORM\Column(type="string", length=150)
  38.      */
  39.     private $url;
  40.     /**
  41.      * @ORM\Column(type="string", length=50, nullable=true)
  42.      */
  43.     private $colorBox;
  44.     public function __construct()
  45.     {
  46.         $this->ssoUsuarioSistemas = new ArrayCollection();
  47.     }
  48.     public function getId(): ?int
  49.     {
  50.         return $this->id;
  51.     }
  52.     public function getClienteOauth2(): ?Client
  53.     {
  54.         return $this->clienteOauth2;
  55.     }
  56.     public function setClienteOauth2(?Client $clienteOauth2): self
  57.     {
  58.         $this->clienteOauth2 $clienteOauth2;
  59.         return $this;
  60.     }
  61.     public function getNombre(): ?string
  62.     {
  63.         return $this->nombre;
  64.     }
  65.     public function setNombre(string $nombre): self
  66.     {
  67.         $this->nombre $nombre;
  68.         return $this;
  69.     }
  70.     public function getDescripcion(): ?string
  71.     {
  72.         return $this->descripcion;
  73.     }
  74.     public function setDescripcion(?string $descripcion): self
  75.     {
  76.         $this->descripcion $descripcion;
  77.         return $this;
  78.     }
  79.     /**
  80.      * @return Collection|SsoUsuarioSistema[]
  81.      */
  82.     public function getSsoUsuarioSistemas(): Collection
  83.     {
  84.         return $this->ssoUsuarioSistemas;
  85.     }
  86.     public function addSsoUsuarioSistema(SsoUsuarioSistema $ssoUsuarioSistema): self
  87.     {
  88.         if (!$this->ssoUsuarioSistemas->contains($ssoUsuarioSistema)) {
  89.             $this->ssoUsuarioSistemas[] = $ssoUsuarioSistema;
  90.             $ssoUsuarioSistema->setSistema($this);
  91.         }
  92.         return $this;
  93.     }
  94.     public function removeSsoUsuarioSistema(SsoUsuarioSistema $ssoUsuarioSistema): self
  95.     {
  96.         if ($this->ssoUsuarioSistemas->removeElement($ssoUsuarioSistema)) {
  97.             // set the owning side to null (unless already changed)
  98.             if ($ssoUsuarioSistema->getSistema() === $this) {
  99.                 $ssoUsuarioSistema->setSistema(null);
  100.             }
  101.         }
  102.         return $this;
  103.     }
  104.     public function getUrl(): ?string
  105.     {
  106.         return $this->url;
  107.     }
  108.     public function setUrl(string $url): self
  109.     {
  110.         $this->url $url;
  111.         return $this;
  112.     }
  113.     public function getColorBox(): ?string
  114.     {
  115.         return $this->colorBox;
  116.     }
  117.     public function setColorBox(?string $colorBox): self
  118.     {
  119.         $this->colorBox $colorBox;
  120.         return $this;
  121.     }
  122. }