src/Entity/Olympiad/OlympiadTranslation.php line 12
<?php
declare(strict_types=1);
namespace App\Entity\Olympiad;
use Doctrine\ORM\Mapping as ORM;
use Knp\DoctrineBehaviors\Contract\Entity\TranslationInterface;
use Knp\DoctrineBehaviors\Model\Translatable\TranslationTrait;
#[ORM\Entity]
class OlympiadTranslation implements TranslationInterface
{
use TranslationTrait {
isEmpty as ttEmpty;
}
#[ORM\Id]
#[ORM\Column(type: 'integer')]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private ?int $id;
#[ORM\Column(type: 'string')]
private ?string $caption = null;
#[ORM\Column(type: 'string', nullable: true)]
private ?string $subtitle = null;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $description = null;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $results = null;
#[ORM\Column(type: 'string', length: 50, nullable: true)]
private ?string $dateString = null;
/**
* @return int|null
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @param int|null $id
*/
public function setId(?int $id): void
{
$this->id = $id;
}
/**
* @return string|null
*/
public function getCaption(): ?string
{
return $this->caption;
}
/**
* @param string|null $caption
*/
public function setCaption(?string $caption): void
{
$this->caption = $caption;
}
/**
* @return string|null
*/
public function getDescription(): ?string
{
return $this->description;
}
/**
* @param string|null $description
*/
public function setDescription(?string $description): void
{
$this->description = $description;
}
/**
* @return string|null
*/
public function getResults(): ?string
{
return $this->results;
}
/**
* @param string|null $results
*/
public function setResults(?string $results): void
{
$this->results = $results;
}
public function isEmpty(): bool
{
$parentResult = $this->ttEmpty();
if ($parentResult) {
return true;
}
if (empty($this->caption)) {
return true;
}
return false;
}
/**
* @return string|null
*/
public function getSubtitle(): ?string
{
return $this->subtitle;
}
/**
* @param string|null $subtitle
*/
public function setSubtitle(?string $subtitle): void
{
$this->subtitle = $subtitle;
}
/**
* @return string|null
*/
public function getDateString(): ?string
{
return $this->dateString;
}
/**
* @param string|null $dateString
*/
public function setDateString(?string $dateString): void
{
$this->dateString = $dateString;
}
}