<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\HootsuiteSocialProfileRepository")
*/
class HootsuiteSocialProfile
{
const SITE_RCS = 1;
/**
* @ORM\Id()
* @ORM\Column(type="string", length=255)
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $type;
/**
* @ORM\Column(type="string", name="socialNetworkId", length=255)
*/
private $socialNetworkId;
/**
* @ORM\Column(type="string", name="socialNetworkUsername", length=255)
*/
private $socialNetworkUsername;
/**
* @ORM\Column(type="text", name="avatarUrl")
*/
private $avatarUrl;
/**
* @ORM\Column(type="string", length=255)
*/
private $owner;
/**
* @ORM\Column(type="string", name="ownerId", length=255)
*/
private $ownerId;
/**
* @ORM\Column(type="integer")
*/
private $status;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\Content", mappedBy="hootsuite_social_profiles", cascade={"persist","remove"})
*/
private $contents;
public function __construct ()
{
$this->type = "";
$this->socialNetworkId = "";
$this->socialNetworkUsername = "";
$this->avatarUrl = "";
$this->owner = "";
$this->ownerId = "";
$this->status = 0;
$this->contents = new ArrayCollection();
}
public function getId()
{
return $this->id;
}
public function setId(string $id): self
{
$this->id = $id;
return $this;
}
public function getType(): string
{
return $this->type;
}
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
public function getSocialNetworkId(): string
{
return $this->socialNetworkId;
}
public function setSocialNetworkId(string $socialNetworkId): self
{
$this->socialNetworkId = $socialNetworkId;
return $this;
}
public function getSocialNetworkUsername(): string
{
return $this->socialNetworkUsername;
}
public function setSocialNetworkUsername(string $socialNetworkUsername): self
{
$this->socialNetworkUsername = $socialNetworkUsername;
return $this;
}
public function getAvatarUrl(): string
{
return $this->avatarUrl;
}
public function setAvatarUrl(string $avatarUrl): self
{
$this->avatarUrl = $avatarUrl;
return $this;
}
public function getOwner(): string
{
return $this->owner;
}
public function setOwner(string $owner): self
{
$this->owner = $owner;
return $this;
}
public function getOwnerId(): string
{
return $this->ownerId;
}
public function setOwnerId(string $ownerId): self
{
$this->ownerId = $ownerId;
return $this;
}
public function getStatus(): ?int
{
return $this->status;
} public function setStatus(int $status): self
{
$this->status = $status;
return $this;
}
public function getContent (): Collection
{
return $this->contents;
}
public function addContent (Content $content)
{
if (!$this->contents->contains($content)) {
$this->contents[] = $content;
$content->addHootsuiteSocialProfile($this);
}
return $this;
}
public function removeContent (Content $content): self
{
if ($this->contents->contains($content)) {
$this->contents->removeElement($content);
$content->removeHootsuiteSocialProfile($this);
}
return $this;
}
public function getSelectionString ()
{
return $this->type . " - " . $this->socialNetworkUsername;
}
public function __toString ()
{
return $this->socialNetworkUsername ? $this->socialNetworkUsername : "";
}
}