<?php
namespace App\Entity;
use App\Repository\CBRCArticleContentRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/**
* @ORM\Entity(repositoryClass=CBRCArticleContentRepository::class)
* @Vich\Uploadable
*/
class CBRCArticleContent extends AbstractArrayAccess
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $shortresume;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $text;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $signature;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $image1;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $document1;
/**
* @ORM\OneToOne(targetEntity=CBRCArticle::class, mappedBy="content", cascade={"persist", "remove"})
*/
private $article;
/**
* @ORM\Column(type="datetime", nullable=true)
* @var \DateTime
*/
private $updatedAt;
/**
* @Vich\UploadableField(mapping="article_images", fileNameProperty="image1")
* @var File
*/
private $image1File;
/**
* @Vich\UploadableField(mapping="article_document", fileNameProperty="document1")
* @var File
*/
private $document1File;
/**
* @ORM\Column(type="blob", nullable=true)
*/
private $contentblob;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $documentname;
public function getId(): ?int
{
return $this->id;
}
public function getShortresume(): ?string
{
return $this->shortresume;
}
public function setShortresume(string $shortresume): self
{
$this->shortresume = $shortresume;
return $this;
}
public function getText(): ?string
{
return $this->text;
}
public function setText(?string $text): self
{
$this->text = $text;
return $this;
}
public function getSignature(): ?string
{
return $this->signature;
}
public function setSignature(?string $signature): self
{
$this->signature = $signature;
return $this;
}
public function getImage1(): ?string
{
return $this->image1;
}
public function setImage1(?string $image1): self
{
$this->image1 = $image1;
return $this;
}
public function getDocument1(): ?string
{
return $this->document1;
}
public function setDocument1(?string $document1): self
{
$this->document1 = $document1;
return $this;
}
public function getArticle(): ?CBRCArticle
{
return $this->article;
}
public function setArticle(CBRCArticle $CBRCArticle): self
{
// set the owning side of the relation if necessary
if ($CBRCArticle->getContent() !== $this) {
$CBRCArticle->setContent($this);
}
$this->article = $CBRCArticle;
return $this;
}
public function setImage1File(File $image = null)
{
$this->image1File = $image;
// 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 ($image) {
// if 'updatedAt' is not defined in your entity, use another property
$this->updatedAt = new \DateTime('now');
}
}
public function getImage1File()
{
return $this->image1File;
}
public function setDocument1File(File $file = null)
{
$this->document1File = $file;
// 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 ($file) {
// if 'updatedAt' is not defined in your entity, use another property
$this->updatedAt = new \DateTime('now');
}
}
public function getDocument1File()
{
return $this->document1File;
}
public function getContentblob()
{
return $this->contentblob;
}
public function setContentblob($contentblob): self
{
$this->contentblob = $contentblob;
return $this;
}
public function getDocumentname(): ?string
{
return $this->documentname;
}
public function setDocumentname(?string $documentname): self
{
$this->documentname = $documentname;
return $this;
}
}