src/Entity/CBRCArticleContent.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CBRCArticleContentRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\HttpFoundation\File\File;
  6. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  7. /**
  8.  * @ORM\Entity(repositoryClass=CBRCArticleContentRepository::class)
  9.  * @Vich\Uploadable
  10.  */
  11. class CBRCArticleContent extends AbstractArrayAccess
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="text", nullable=true)
  21.      */
  22.     private $shortresume;
  23.     /**
  24.      * @ORM\Column(type="text", nullable=true)
  25.      */
  26.     private $text;
  27.     /**
  28.      * @ORM\Column(type="string", length=255, nullable=true)
  29.      */
  30.     private $signature;
  31.     /**
  32.      * @ORM\Column(type="string", length=255, nullable=true)
  33.      */
  34.     private $image1;
  35.     /**
  36.      * @ORM\Column(type="string", length=255, nullable=true)
  37.      */
  38.     private $document1;
  39.     /**
  40.      * @ORM\OneToOne(targetEntity=CBRCArticle::class, mappedBy="content", cascade={"persist", "remove"})
  41.      */
  42.     private $article;
  43.     /**
  44.      * @ORM\Column(type="datetime", nullable=true)
  45.      * @var \DateTime
  46.      */
  47.     private $updatedAt;
  48.     /**
  49.      * @Vich\UploadableField(mapping="article_images", fileNameProperty="image1")
  50.      * @var File
  51.      */
  52.     private $image1File;
  53.     /**
  54.      * @Vich\UploadableField(mapping="article_document", fileNameProperty="document1")
  55.      * @var File
  56.      */
  57.     private $document1File;
  58.     /**
  59.      * @ORM\Column(type="blob", nullable=true)
  60.      */
  61.     private $contentblob;
  62.     /**
  63.      * @ORM\Column(type="string", length=255, nullable=true)
  64.      */
  65.     private $documentname;
  66.     public function getId(): ?int
  67.     {
  68.         return $this->id;
  69.     }
  70.     public function getShortresume(): ?string
  71.     {
  72.         return $this->shortresume;
  73.     }
  74.     public function setShortresume(string $shortresume): self
  75.     {
  76.         $this->shortresume $shortresume;
  77.         return $this;
  78.     }
  79.     public function getText(): ?string
  80.     {
  81.         return $this->text;
  82.     }
  83.     public function setText(?string $text): self
  84.     {
  85.         $this->text $text;
  86.         return $this;
  87.     }
  88.     public function getSignature(): ?string
  89.     {
  90.         return $this->signature;
  91.     }
  92.     public function setSignature(?string $signature): self
  93.     {
  94.         $this->signature $signature;
  95.         return $this;
  96.     }
  97.     public function getImage1(): ?string
  98.     {
  99.         return $this->image1;
  100.     }
  101.     public function setImage1(?string $image1): self
  102.     {
  103.         $this->image1 $image1;
  104.         return $this;
  105.     }
  106.     public function getDocument1(): ?string
  107.     {
  108.         return $this->document1;
  109.     }
  110.     public function setDocument1(?string $document1): self
  111.     {
  112.         $this->document1 $document1;
  113.         return $this;
  114.     }
  115.     public function getArticle(): ?CBRCArticle
  116.     {
  117.         return $this->article;
  118.     }
  119.     public function setArticle(CBRCArticle $CBRCArticle): self
  120.     {
  121.         // set the owning side of the relation if necessary
  122.         if ($CBRCArticle->getContent() !== $this) {
  123.             $CBRCArticle->setContent($this);
  124.         }
  125.         $this->article $CBRCArticle;
  126.         return $this;
  127.     }
  128.     public function setImage1File(File $image null)
  129.     {
  130.         $this->image1File $image;
  131.         // VERY IMPORTANT:
  132.         // It is required that at least one field changes if you are using Doctrine,
  133.         // otherwise the event listeners won't be called and the file is lost
  134.         if ($image) {
  135.             // if 'updatedAt' is not defined in your entity, use another property
  136.             $this->updatedAt = new \DateTime('now');
  137.         }
  138.     }
  139.     public function getImage1File()
  140.     {
  141.         return $this->image1File;
  142.     }
  143.     public function setDocument1File(File $file null)
  144.     {
  145.         $this->document1File $file;
  146.         // VERY IMPORTANT:
  147.         // It is required that at least one field changes if you are using Doctrine,
  148.         // otherwise the event listeners won't be called and the file is lost
  149.         if ($file) {
  150.             // if 'updatedAt' is not defined in your entity, use another property
  151.             $this->updatedAt = new \DateTime('now');
  152.         }
  153.     }
  154.     public function getDocument1File()
  155.     {
  156.         return $this->document1File;
  157.     }
  158.     public function getContentblob()
  159.     {
  160.         return $this->contentblob;
  161.     }
  162.     public function setContentblob($contentblob): self
  163.     {
  164.         $this->contentblob $contentblob;
  165.         return $this;
  166.     }
  167.     public function getDocumentname(): ?string
  168.     {
  169.         return $this->documentname;
  170.     }
  171.     public function setDocumentname(?string $documentname): self
  172.     {
  173.         $this->documentname $documentname;
  174.         return $this;
  175.     }
  176. }