<?php
// src/Acme/UserBundle/Entity/User.php
namespace App\Entity;
use Knp\DoctrineBehaviors\Contract\Entity\SoftDeletableInterface;
use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletableTrait;
use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
use Knp\DoctrineBehaviors\Contract\Entity\BlameableInterface;
use Knp\DoctrineBehaviors\Model\Blameable\BlameableTrait;
use App\Model\LangParamRelationInterface;
use Doctrine\ORM\Mapping as ORM;
/**
* @Doctrine\ORM\Mapping\Entity
* @Doctrine\ORM\Mapping\Table(name="category_lang_param")
*/
class CategoryLangParam implements LangParamRelationInterface, BlameableInterface, TimestampableInterface, SoftDeletableInterface {
use BlameableTrait;
use TimestampableTrait;
use SoftDeletableTrait;
/**
* @var integer
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Category", inversedBy="langParams")
* @ORM\JoinColumn(name="category_id", referencedColumnName="id")
*/
protected $category;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Language")
* @ORM\JoinColumn(name="language", referencedColumnName="id")
*/
protected $language;
/**
* @Doctrine\ORM\Mapping\Column(type="boolean", nullable=true)
*/
protected $visible = true;
/**
* @Doctrine\ORM\Mapping\Column(type="boolean", nullable=true)
*/
protected $special = false;
/**
* @Doctrine\ORM\Mapping\Column(type="boolean", nullable=true)
*/
protected $shortcut = false;
/**
* @var string
*
* @ORM\Column(name="position", type="integer", nullable=true)
*/
private $position;
/**
* @Doctrine\ORM\Mapping\Column(type="boolean", nullable=true, options={"default"=1})
*/
protected $isHomepage;
/**
* @return int
*/
public function getNbProducts()
{
return $this->nbProducts;
}
/**
* @param int $nbProducts
*/
public function setNbProducts(int $nbProducts): void
{
$this->nbProducts = $nbProducts;
}
/**
* @var integer
*
* @ORM\Column(name="nb_products", type="integer", length=255, nullable=true)
*/
private $nbProducts;
public function getId(): ?int
{
return $this->id;
}
public function getVisible(): ?bool
{
return $this->visible;
}
public function setVisible(?bool $visible): self
{
$this->visible = $visible;
return $this;
}
public function getSpecial(): ?bool
{
return $this->special;
}
public function setSpecial(?bool $special): self
{
$this->special = $special;
return $this;
}
public function getShortcut(): ?bool
{
return $this->shortcut;
}
public function setShortcut(?bool $shortcut): self
{
$this->shortcut = $shortcut;
return $this;
}
public function getPosition(): ?string
{
return $this->position;
}
public function setPosition(?string $position): self
{
$this->position = $position;
return $this;
}
public function getCategory(): ?Category
{
return $this->category;
}
public function setCategory(?Category $category): self
{
$this->category = $category;
return $this;
}
public function getLanguage(): ?Language
{
return $this->language;
}
public function setLanguage(?Language $language): self
{
$this->language = $language;
return $this;
}
/**
* @return mixed
*/
public function getisHomepage()
{
return $this->isHomepage;
}
/**
* @return mixed
*/
public function isHomepage()
{
return $this->isHomepage;
}
/**
* @param mixed $isHomepage
*/
public function setIsHomepage($isHomepage): void
{
$this->isHomepage = $isHomepage;
}
}