<?php
namespace App\CmsBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(
* repositoryClass="App\CmsBundle\Repository\BulletRepository"
* )
*
* @ORM\Table(
* name="bullet"
* )
*/
class Bullet
{
use IdTrait;
/**
* @ORM\ManyToOne(targetEntity="App\CmsBundle\Entity\Route", inversedBy="bullet")
* @ORM\JoinColumn(name="route_id", referencedColumnName="id", nullable=true, onDelete="CASCADE")
*/
private Route $route;
/**
* @ORM\ManyToOne(targetEntity="App\CmsBundle\Entity\Page", inversedBy="bullet")
* @ORM\JoinColumn(name="page_id", referencedColumnName="id", nullable=true, onDelete="CASCADE")
*/
private ?Page $page = null;
/**
* @var ?string
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $key = null;
/**
* @var ?string
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $value = null;
/**
* @var ?string
* @ORM\Column(type="string", length=100, nullable=true)
*/
private ?string $icon = null;
/**
* @var ?string
* @ORM\Column(type="string", length=100, nullable=true)
*/
private ?string $position = null;
public function __toArray(): array
{
return [
'key' => $this->key,
'value' => $this->value,
'icon' => $this->icon,
'position' => $this->position
];
}
/**
* @return Route
*/
public function getRoute(): Route
{
return $this->route;
}
/**
* @param Route $route
* @return $this
*/
public function setRoute(Route $route): self
{
$this->route = $route;
return $this;
}
/**
* @return Page|null
*/
public function getPage(): ?Page
{
return $this->page;
}
/**
* @param Page $page
* @return $this
*/
public function setPage(Page $page): self
{
$this->page = $page;
return $this;
}
/**
* @return string
*/
public function getKey(): string
{
return $this->key;
}
/**
* @param string $key
* @return Bullet
*/
public function setKey(string $key): self
{
$this->key = $key;
return $this;
}
/**
* @return string
*/
public function getValue(): string
{
return $this->value;
}
/**
* @param string $value
* @return Bullet
*/
public function setValue(string $value): self
{
$this->value = $value;
return $this;
}
/**
* @return int
*/
public function getIcon(): int
{
return $this->icon;
}
/**
* @param int $icon
* @return Bullet
*/
public function setIcon(int $icon): self
{
$this->icon = $icon;
return $this;
}
/**
* @return ?string
*/
public function getPosition(): ?string
{
return $this->position;
}
/**
* @param string $position
* @return Bullet
*/
public function setPosition(string $position): self
{
$this->position = $position;
return $this;
}
}