src/Entity/HootsuiteSocialProfile.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\HootsuiteSocialProfileRepository")
  8.  */
  9. class HootsuiteSocialProfile
  10. {
  11.     const SITE_RCS 1;
  12.     
  13.     /**
  14.      * @ORM\Id()
  15.      * @ORM\Column(type="string", length=255)
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $type;
  22.     /**
  23.      * @ORM\Column(type="string", name="socialNetworkId", length=255)
  24.      */
  25.     private $socialNetworkId;
  26.     /**
  27.      * @ORM\Column(type="string", name="socialNetworkUsername", length=255)
  28.      */
  29.     private $socialNetworkUsername;
  30.     /**
  31.      
  32.      * @ORM\Column(type="text", name="avatarUrl")
  33.      */
  34.     private $avatarUrl;
  35.     /**
  36.      * @ORM\Column(type="string", length=255)
  37.      */
  38.     private $owner;
  39.     /**
  40.      * @ORM\Column(type="string", name="ownerId", length=255)
  41.      */
  42.     private $ownerId;
  43.     /**
  44.      * @ORM\Column(type="integer")
  45.      */
  46.     private $status;
  47.     /**
  48.      * @ORM\ManyToMany(targetEntity="App\Entity\Content", mappedBy="hootsuite_social_profiles", cascade={"persist","remove"})
  49.      */
  50.     private $contents;
  51.     
  52.     
  53.     public function __construct ()
  54.     {
  55.         $this->type "";
  56.         $this->socialNetworkId "";
  57.         $this->socialNetworkUsername "";
  58.         $this->avatarUrl "";
  59.         $this->owner "";
  60.         $this->ownerId "";
  61.         $this->status 0;
  62.         $this->contents = new ArrayCollection();
  63.     }
  64.     
  65.     public function getId()
  66.     {
  67.         return $this->id;
  68.     }
  69.     public function setId(string $id): self
  70.     {
  71.         $this->id $id;
  72.         return $this;
  73.     }
  74.     public function getType(): string
  75.     {
  76.         return $this->type;
  77.     }
  78.     
  79.     public function setType(string $type): self
  80.     {
  81.         $this->type $type;
  82.         return $this;
  83.     }
  84.     public function getSocialNetworkId(): string
  85.     {
  86.         return $this->socialNetworkId;
  87.     }
  88.     
  89.     public function setSocialNetworkId(string $socialNetworkId): self
  90.     {
  91.         $this->socialNetworkId $socialNetworkId;
  92.         return $this;
  93.     }
  94.     public function getSocialNetworkUsername(): string
  95.     {
  96.         return $this->socialNetworkUsername;
  97.     }
  98.     
  99.     public function setSocialNetworkUsername(string $socialNetworkUsername): self
  100.     {
  101.         $this->socialNetworkUsername $socialNetworkUsername;
  102.         return $this;
  103.     }
  104.     public function getAvatarUrl(): string
  105.     {
  106.         return $this->avatarUrl;
  107.     }
  108.     
  109.     public function setAvatarUrl(string $avatarUrl): self
  110.     {
  111.         $this->avatarUrl $avatarUrl;
  112.         return $this;
  113.     }
  114.     public function getOwner(): string
  115.     {
  116.         return $this->owner;
  117.     }
  118.     
  119.     public function setOwner(string $owner): self
  120.     {
  121.         $this->owner $owner;
  122.         return $this;
  123.     }
  124.     public function getOwnerId(): string
  125.     {
  126.         return $this->ownerId;
  127.     }
  128.     
  129.     public function setOwnerId(string $ownerId): self
  130.     {
  131.         $this->ownerId $ownerId;
  132.         return $this;
  133.     }
  134.     public function getStatus(): ?int
  135.     {
  136.         return $this->status;
  137.     }    public function setStatus(int $status): self
  138.     {
  139.         $this->status $status;
  140.         return $this;
  141.     }
  142.     public function getContent (): Collection
  143.     {
  144.         return $this->contents;
  145.     }
  146.     
  147.     public function addContent (Content $content)
  148.     {
  149.         if (!$this->contents->contains($content)) {
  150.             $this->contents[] = $content;
  151.             $content->addHootsuiteSocialProfile($this);
  152.         }
  153.         return $this;
  154.     }
  155.     
  156.     public function removeContent (Content $content): self
  157.     {
  158.         if ($this->contents->contains($content)) {
  159.             $this->contents->removeElement($content);
  160.             $content->removeHootsuiteSocialProfile($this);
  161.         }
  162.         return $this;
  163.     }
  164.     
  165.     public function getSelectionString ()
  166.     {
  167.         return $this->type " - " $this->socialNetworkUsername;
  168.     }
  169.     public function __toString ()
  170.     {
  171.         return $this->socialNetworkUsername $this->socialNetworkUsername "";
  172.     }
  173.     
  174.     
  175. }