<?phpnamespace App\AtechNet\CoreBundle\Entity;use App\AtechNet\CoreBundle\Repository\CustomerLinkRepository;use Doctrine\ORM\Mapping\Column;use Doctrine\ORM\Mapping\Entity;use Doctrine\ORM\Mapping\JoinColumn;use Doctrine\ORM\Mapping\ManyToOne;use Doctrine\ORM\Mapping\Table as Table;/** * CustomerLink * * @Table(name="customers__links") * @Entity(repositoryClass=CustomerLinkRepository::class) */class CustomerLink extends AbstractEntity{ /** * @var Domain * * @ManyToOne(targetEntity="Customer", inversedBy="links") * @JoinColumn(name="customer_id", referencedColumnName="id") */ private $customer; public const Type_Web = 1; public const Type_Eshop = 2; public const Type_Facebook = 3; public const Type_GooglePlus = 4; public const Type_Twitter = 5; public static function getTypeChoices() { return [ self::Type_Web => 'web', self::Type_Eshop => 'e-shop', self::Type_Facebook => 'Facebook', self::Type_GooglePlus => 'Google Plus', self::Type_Twitter => 'Twitter', ]; } /** * @var int * * @Column(name="type", type="integer") */ private $type; /** * @var string * * @Column(name="url", type="text") */ private $url; /** * @return Customer */ public function getCustomer() { return $this->customer; } /** * @param Customer $customer */ public function setCustomer($customer) { $this->customer = $customer; } /** * Set type * * @param int $type * @return CustomerLink */ public function setType($type) { $this->type = $type; return $this; } /** * Get type * * @return int */ public function getType() { return $this->type; } /** * Set url * * @param string $url * @return CustomerLink */ public function setUrl($url) { $this->url = $url; return $this; } /** * Get url * * @return string */ public function getUrl() { return $this->url; }}