<?php
namespace App\Entity;
use App\Entity\Sale;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass="App\Repository\SaleHighlightRepository")
*
* @ORM\Table(name="sale_highlight")
*/
class SaleHighlight
{
/**
* @ORM\Id
*
* @ORM\Column(type="bigint")
*
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(type="string")
*
* @Gedmo\Translatable
*/
protected $title;
/**
* @ORM\Column(type="string")
*
* @Gedmo\Translatable
*/
protected $image;
/**
* @ORM\Column(type="string")
*
* @Gedmo\Translatable
*/
protected $linkLabel;
/**
* @ORM\Column(type="string", nullable=true)
*
* @Gedmo\Translatable
*/
protected $link;
/**
* Locale.
*
* @Gedmo\Locale
*/
protected $locale;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Sale", inversedBy="highlights", fetch="EAGER", cascade={"persist"})
*
* @ORM\JoinColumn(nullable=false)
*/
private $sale;
/** @var array */
private $translations;
public function getId()
{
return $this->id;
}
public function setSale(Sale $sale): void
{
$this->sale = $sale;
}
public function getSale()
{
return $this->sale;
}
public function getTitle()
{
return $this->title;
}
public function setTitle($title): void
{
$this->title = $title;
}
public function getImage()
{
return $this->image;
}
public function setImage($image): void
{
$this->image = str_replace('http:', 'https:', $image);
}
public function getLinkLabel()
{
return $this->linkLabel;
}
public function setLinkLabel($linkLabel): void
{
$this->linkLabel = $linkLabel;
}
public function getLink()
{
return $this->link;
}
public function setLink($link): void
{
$this->link = $link;
}
public function getLocale()
{
return $this->locale;
}
public function setLocale($locale): void
{
$this->locale = $locale;
}
public function setTranslatableLocale($locale): void
{
$this->locale = $locale;
}
public function setTranslations(array $translations): void
{
$this->translations = $translations;
}
}