src/Entity/Image.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * Image
  8.  *
  9.  * @ORM\Table(name="image")
  10.  * @ORM\Entity(repositoryClass="App\Repository\ImageRepository")
  11.  */
  12. class Image
  13. {
  14.     use \Gedmo\Timestampable\Traits\TimestampableEntity;
  15.     use BlameableEntity;
  16.     /**
  17.      * @var int
  18.      *
  19.      * @ORM\Column(name="id", type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     private $id;
  24.     /**
  25.      * Relative Path from s3
  26.      *
  27.      * @ORM\Column(name="s3_path", type="string", length=255)
  28.      */
  29.     private $s3Path;
  30.     /**
  31.      * Title
  32.      * @ORM\Column(name="title", type="string", length=100)
  33.      */
  34.     private $title;
  35.     /**
  36.      * Description
  37.      * @ORM\Column(name="description", type="text", nullable=true)
  38.      */
  39.     private $description;
  40.     /**
  41.      * Copyright
  42.      * @ORM\Column(name="copyright", type="text", nullable=true)
  43.      */
  44.     private $copyright;
  45.     /**
  46.      * @return mixed
  47.      */
  48.     public function getCopyright()
  49.     {
  50.         return $this->copyright;
  51.     }
  52.     /**
  53.      * @param mixed $copyright
  54.      */
  55.     public function setCopyright($copyright)
  56.     {
  57.         $this->copyright $copyright;
  58.     }
  59.     /**
  60.      * @ORM\ManyToOne(targetEntity="App\Entity\Event", inversedBy="images")
  61.      * @ORM\JoinColumn(name="event_id", referencedColumnName="id")
  62.      */
  63.     private $event;
  64.     /**
  65.      * @ORM\Column(name="position", type="integer", nullable=true)
  66.      */
  67.     private $position;
  68.     /**
  69.      * @ORM\Column(name="disabled", type="boolean", nullable=false, options={"default":"0"})
  70.      */
  71.     private $disabled;
  72.     /**
  73.      * @return mixed
  74.      */
  75.     public function isDisabled()
  76.     {
  77.         return $this->disabled;
  78.     }
  79.     /**
  80.      * @param mixed $disabled
  81.      */
  82.     public function setDisabled($disabled)
  83.     {
  84.         $this->disabled $disabled;
  85.     }
  86.     public function __construct()
  87.     {
  88.     }
  89.     public function __toString()
  90.     {
  91.         return $this->getTitle();
  92.     }
  93.     /**
  94.      * @return mixed
  95.      */
  96.     public function getTitle()
  97.     {
  98.         return $this->title;
  99.     }
  100.     /**
  101.      * @param mixed $title
  102.      */
  103.     public function setTitle($title)
  104.     {
  105.         $this->title $title;
  106.     }
  107.     /**
  108.      * Get id
  109.      *
  110.      * @return integer
  111.      */
  112.     public function getId()
  113.     {
  114.         return $this->id;
  115.     }
  116.     /**
  117.      * Get s3Path
  118.      *
  119.      * @return string
  120.      */
  121.     public function getS3Path()
  122.     {
  123.         return $this->s3Path;
  124.     }
  125.     /**
  126.      * Set s3Path
  127.      *
  128.      * @param string $s3Path
  129.      *
  130.      * @return Document
  131.      */
  132.     public function setS3Path($s3Path)
  133.     {
  134.         $this->s3Path $s3Path;
  135.         return $this;
  136.     }
  137.     /**
  138.      * Get event
  139.      *
  140.      * @return Event
  141.      */
  142.     public function getEvent()
  143.     {
  144.         return $this->event;
  145.     }
  146.     /**
  147.      * Set event
  148.      *
  149.      * @param Event $event
  150.      *
  151.      * @return Document
  152.      */
  153.     public function setEvent(Event $event null)
  154.     {
  155.         $this->event $event;
  156.         return $this;
  157.     }
  158.     /**
  159.      * Set rfp
  160.      * @param RequestForProposal $rfp
  161.      * @return Document
  162.      */
  163.     public function setRfp(RequestForProposal $rfp null)
  164.     {
  165.         $this->rfp $rfp;
  166.         return $this;
  167.     }
  168.     public function toString(): string
  169.     {
  170.         return "{id=" $this->id "}";
  171.     }
  172.     /**
  173.      * Add userRight
  174.      *
  175.      * @param DocumentUserRights $userRight
  176.      *
  177.      * @return Document
  178.      */
  179.     public function addUserRight(DocumentUserRights $userRight)
  180.     {
  181.         $userRight->setDocument($this);
  182.         $this->userRights[] = $userRight;
  183.         return $this;
  184.     }
  185.     /**
  186.      * Get groupRights
  187.      *
  188.      * @return Collection
  189.      */
  190.     public function getCompanyRights()
  191.     {
  192.         return $this->companyRights;
  193.     }
  194.     /**
  195.      * @return mixed
  196.      */
  197.     public function getDescription()
  198.     {
  199.         return $this->description;
  200.     }
  201.     /**
  202.      * @param mixed $description
  203.      */
  204.     public function setDescription($description)
  205.     {
  206.         $this->description $description;
  207.     }
  208.     /**
  209.      * @return mixed
  210.      */
  211.     public function getPosition()
  212.     {
  213.         return $this->position;
  214.     }
  215.     /**
  216.      * @param integer $position
  217.      */
  218.     public function setPosition($position): void
  219.     {
  220.         $this->position $position;
  221.     }
  222. }