<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/**
* Information
*
* @ORM\Table(name="information")
* @ORM\Entity(repositoryClass="App\Repository\InformationRepository")
* @Vich\Uploadable
*/
class Information
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="title", type="string", length=255)
*/
private $title;
/**
* @var string
*
* @ORM\Column(name="level", type="string", length=255)
*/
private $level;
/**
* @var string
*
* @ORM\Column(name="text", type="text")
*/
private $text;
/**
* @ORM\Column(type="datetime")
* @var \DateTime
*/
private $start;
/**
* @ORM\Column(type="datetime")
* @var \DateTime
*/
private $end;
/**
* @ORM\Column(type="datetime", nullable=true)
* @var \DateTime
*/
private $updatedAt;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @var string|null
*/
private $pdf;
/**
* @Vich\UploadableField(mapping="information_pdf", fileNameProperty="pdf")
* @var File
*/
private $pdfFile;
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set title
*
* @param string $title
*
* @return Information
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Set level
*
* @param string $level
*
* @return Information
*/
public function setLevel($level)
{
$this->level = $level;
return $this;
}
/**
* Get level
*
* @return string
*/
public function getLevel()
{
return $this->level;
}
/**
* Set text
*
* @param string $text
*
* @return Information
*/
public function setText($text)
{
$this->text = $text;
return $this;
}
/**
* Get text
*
* @return string
*/
public function getText()
{
return $this->text;
}
/**
* Set start
*
* @param \DateTime $start
*
* @return Information
*/
public function setStart($start)
{
$this->start = $start;
return $this;
}
/**
* Get start
*
* @return \DateTime
*/
public function getStart()
{
return $this->start;
}
/**
* Set end
*
* @param \DateTime $end
*
* @return Information
*/
public function setEnd($end)
{
$this->end = $end;
return $this;
}
/**
* Get end
*
* @return \DateTime
*/
public function getEnd()
{
return $this->end;
}
/**
* Set updatedAt
*
* @param \DateTime $updatedAt
*
* @return Information
*/
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = $updatedAt;
return $this;
}
/**
* Get updatedAt
*
* @return \DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
public function setPdfFile(File $pdf = null)
{
$this->pdfFile = $pdf;
// VERY IMPORTANT:
// It is required that at least one field changes if you are using Doctrine,
// otherwise the event listeners won't be called and the file is lost
if ($pdf) {
// if 'updatedAt' is not defined in your entity, use another property
$this->updatedAt = new \DateTime();
}
}
public function getPdfFile()
{
return $this->pdfFile;
}
public function setPdf($pdf)
{
$this->pdf = $pdf;
}
public function getPdf()
{
return $this->pdf;
}
}