src/Entity/Slave/ProductRequest.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Slave;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Table(name="eposm_s_product_request")
  9.  * @ORM\Entity(repositoryClass="App\Repository\Slave\ProductRequestRepository")
  10.  */
  11. class ProductRequest
  12. {
  13.     public function displayDetails()
  14.     {
  15.         $json json_decode($this->detailstrue);
  16.         if($json != null && array_key_exists('qty'$json)) $qty $json['qty']; else $qty "";
  17.         if($json != null && array_key_exists('modelName'$json)) $modelName $json['modelName']; else $modelName "";
  18.         if($json != null && array_key_exists('producerName'$json)) $producerName $json['producerName']; else $producerName "";
  19.         if($json != null && array_key_exists('supplierName'$json)) $supplierName $json['supplierName']; else $supplierName "";
  20.         return
  21.         '<table class="table table_no_padding b_none m_b_none responsive_font_size">
  22.             <thead>
  23.                 <tr>
  24.                     <th class="td_w_40p txt_a_c"><label class="m_b_none l_s_none font_12">Qtà</label></th>
  25.                     <th class="td_w_400p"><label class="m_b_none l_s_none font_12">Modello</label></th>
  26.                     <th class="td_w_150p"><label class="m_b_none l_s_none font_12">Produttore</label></th>
  27.                     <th class="td_w_150p"><label class="m_b_none l_s_none font_12">Fornitore</label></th>
  28.                 </tr>
  29.             </thead>
  30.             <tbody>
  31.                 <tr>
  32.                     <td class="txt_a_c">'.$qty.'</td>
  33.                     <td>'.$modelName.'</td>
  34.                     <td>'.$producerName.'</td>
  35.                     <td>'.$supplierName.'</td>
  36.                 </tr>
  37.             </tbody>
  38.         </table>';
  39.     }
  40.     
  41.     /**
  42.      * @ORM\Column(name="id", type="bigint")
  43.      * @ORM\Id
  44.      * @ORM\GeneratedValue(strategy="AUTO")
  45.      */
  46.     protected $id;
  47.     
  48.     /**
  49.      * @ORM\Column(name="phase", type="string", length=191)
  50.      */
  51.     protected $phase;
  52.     /**
  53.      * @ORM\Column(name="datetime", type="datetime", nullable=true)
  54.      */
  55.     protected $datetime;
  56.     /**
  57.      * @ORM\Column(name="details", type="text")
  58.      */
  59.     protected $details;
  60.     /**
  61.      * @ORM\Column(name="notes", type="text", nullable=true)
  62.      */
  63.     protected $notes;
  64.     // ManyToOne
  65.         /**
  66.          * @ORM\ManyToOne(targetEntity="App\Entity\Slave\User", inversedBy="productRequests")
  67.          * @ORM\JoinColumn(name="technician_id", referencedColumnName="id")
  68.          */
  69.         private $technician;
  70.         /**
  71.          * @ORM\ManyToOne(targetEntity="App\Entity\Slave\Warehouse", inversedBy="productRequests")
  72.          * @ORM\JoinColumn(name="warehouse_id", referencedColumnName="id")
  73.          */
  74.         private $warehouse;
  75.         
  76.         /**
  77.          * @ORM\ManyToOne(targetEntity="App\Entity\Slave\Warehouse", inversedBy="headquarterProductRequests")
  78.          * @ORM\JoinColumn(name="warehouse_headquarter_id", referencedColumnName="id")
  79.          */
  80.         private $warehouseHeadquarter;
  81.     //
  82.     public function getId(): ?string
  83.     {
  84.         return $this->id;
  85.     }
  86.     public function getPhase(): ?string
  87.     {
  88.         return $this->phase;
  89.     }
  90.     public function setPhase(string $phase): static
  91.     {
  92.         $this->phase $phase;
  93.         return $this;
  94.     }
  95.     public function getDatetime(): ?\DateTimeInterface
  96.     {
  97.         return $this->datetime;
  98.     }
  99.     public function setDatetime(?\DateTimeInterface $datetime): static
  100.     {
  101.         $this->datetime $datetime;
  102.         return $this;
  103.     }
  104.     public function getDetails(): ?string
  105.     {
  106.         return $this->details;
  107.     }
  108.     public function setDetails(string $details): static
  109.     {
  110.         $this->details $details;
  111.         return $this;
  112.     }
  113.     public function getNotes(): ?string
  114.     {
  115.         return $this->notes;
  116.     }
  117.     public function setNotes(?string $notes): static
  118.     {
  119.         $this->notes $notes;
  120.         return $this;
  121.     }
  122.     public function getTechnician(): ?User
  123.     {
  124.         return $this->technician;
  125.     }
  126.     public function setTechnician(?User $technician): static
  127.     {
  128.         $this->technician $technician;
  129.         return $this;
  130.     }
  131.     public function getWarehouse(): ?Warehouse
  132.     {
  133.         return $this->warehouse;
  134.     }
  135.     public function setWarehouse(?Warehouse $warehouse): static
  136.     {
  137.         $this->warehouse $warehouse;
  138.         return $this;
  139.     }
  140.     public function getWarehouseHeadquarter(): ?Warehouse
  141.     {
  142.         return $this->warehouseHeadquarter;
  143.     }
  144.     public function setWarehouseHeadquarter(?Warehouse $warehouseHeadquarter): static
  145.     {
  146.         $this->warehouseHeadquarter $warehouseHeadquarter;
  147.         return $this;
  148.     }
  149. }