src/Entity/BusinessCardOption.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\BusinessCardOptionRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Timestampable\Traits\TimestampableEntity;
  8. /**
  9.  * @ORM\Entity(repositoryClass=BusinessCardOptionRepository::class)
  10.  */
  11. class BusinessCardOption
  12. {
  13.     use TimestampableEntity;
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=CalculatorProductBusinessCard::class, inversedBy="businessCardOptions")
  22.      */
  23.     private $calculatorProductBusinessCard;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity=Machine::class, inversedBy="businessCardOptions")
  26.      */
  27.     private $machine;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=PaperSize::class)
  30.      */
  31.     private $paperSize;
  32.     /**
  33.      * @ORM\Column(type="integer")
  34.      */
  35.     private $finishedSizeX;
  36.     /**
  37.      * @ORM\Column(type="integer")
  38.      */
  39.     private $finishedSizeY;
  40.     /**
  41.      * @ORM\ManyToOne(targetEntity=Imposition::class)
  42.      */
  43.     private $imposition;
  44.     /**
  45.      * @ORM\Column(type="string", length=255)
  46.      */
  47.     private $sideOne;
  48.     /**
  49.      * @ORM\Column(type="string", length=255)
  50.      */
  51.     private $sideTwo;
  52.     /**
  53.      * @ORM\ManyToMany(targetEntity=Task::class, inversedBy="businessCardOptions", cascade={"persist"})
  54.      */
  55.     private $tasks;
  56.     /**
  57.      * @ORM\ManyToOne(targetEntity=Machine::class, inversedBy="businessCardOptions")
  58.      */
  59.     private $printingType;
  60.     /**
  61.      * @ORM\ManyToOne(targetEntity=Product::class, inversedBy="businessCardOptions")
  62.      */
  63.     private $paperType;
  64.     /**
  65.      * @ORM\Column(type="string", length=255, nullable=true)
  66.      */
  67.     private $name;
  68.     public function __construct()
  69.     {
  70.         $this->tasks = new ArrayCollection();
  71.     }
  72.     public function getId(): ?int
  73.     {
  74.         return $this->id;
  75.     }
  76.     public function getCalculatorProductBusinessCard(): ?CalculatorProductBusinessCard
  77.     {
  78.         return $this->calculatorProductBusinessCard;
  79.     }
  80.     public function setCalculatorProductBusinessCard(?CalculatorProductBusinessCard $calculatorProductBusinessCard): self
  81.     {
  82.         $this->calculatorProductBusinessCard $calculatorProductBusinessCard;
  83.         return $this;
  84.     }
  85.     public function getMachine(): ?Machine
  86.     {
  87.         return $this->machine;
  88.     }
  89.     public function setMachine(?Machine $machine): self
  90.     {
  91.         $this->machine $machine;
  92.         return $this;
  93.     }
  94.     public function getPaperSize(): ?PaperSize
  95.     {
  96.         return $this->paperSize;
  97.     }
  98.     public function setPaperSize(?PaperSize $paperSize): self
  99.     {
  100.         $this->paperSize $paperSize;
  101.         return $this;
  102.     }
  103.     public function getFinishedSizeX(): ?int
  104.     {
  105.         return $this->finishedSizeX;
  106.     }
  107.     public function setFinishedSizeX(int $finishedSizeX): self
  108.     {
  109.         $this->finishedSizeX $finishedSizeX;
  110.         return $this;
  111.     }
  112.     public function getFinishedSizeY(): ?int
  113.     {
  114.         return $this->finishedSizeY;
  115.     }
  116.     public function setFinishedSizeY(int $finishedSizeY): self
  117.     {
  118.         $this->finishedSizeY $finishedSizeY;
  119.         return $this;
  120.     }
  121.     public function getImposition(): ?Imposition
  122.     {
  123.         return $this->imposition;
  124.     }
  125.     public function setImposition(?Imposition $imposition): self
  126.     {
  127.         $this->imposition $imposition;
  128.         return $this;
  129.     }
  130.     public function getSideOne(): ?string
  131.     {
  132.         return $this->sideOne;
  133.     }
  134.     public function setSideOne(string $sideOne): self
  135.     {
  136.         $this->sideOne $sideOne;
  137.         return $this;
  138.     }
  139.     public function getSideTwo(): ?string
  140.     {
  141.         return $this->sideTwo;
  142.     }
  143.     public function setSideTwo(string $sideTwo): self
  144.     {
  145.         $this->sideTwo $sideTwo;
  146.         return $this;
  147.     }
  148.     /**
  149.      * @return Collection<int, Task>
  150.      */
  151.     public function getTasks(): Collection
  152.     {
  153.         return $this->tasks;
  154.     }
  155.     public function addTask(Task $task): self
  156.     {
  157.         if (!$this->tasks->contains($task)) {
  158.             $this->tasks[] = $task;
  159.         }
  160.         return $this;
  161.     }
  162.     public function removeTask(Task $task): self
  163.     {
  164.         $this->tasks->removeElement($task);
  165.         return $this;
  166.     }
  167.     public function getPrintingType(): ?Machine
  168.     {
  169.         return $this->printingType;
  170.     }
  171.     public function setPrintingType(?Machine $printingType): self
  172.     {
  173.         $this->printingType $printingType;
  174.         return $this;
  175.     }
  176.     public function getPaperType(): ?Product
  177.     {
  178.         return $this->paperType;
  179.     }
  180.     public function setPaperType(?Product $paperType): self
  181.     {
  182.         $this->paperType $paperType;
  183.         return $this;
  184.     }
  185.     public function getName(): ?string
  186.     {
  187.         return $this->name;
  188.     }
  189.     public function setName(?string $name): self
  190.     {
  191.         $this->name $name;
  192.         return $this;
  193.     }
  194. /*    function __clone(){
  195.         $this->id = null;
  196.         //$this->tasks = $tasks;
  197.     }*/
  198. }