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_50p txt_a_c"><label class="m_b_none l_s_none font_12">Qtà</label></th>
  25.                     <th class="td_w_250p"><label class="m_b_none l_s_none font_12">Modello</label></th>
  26.                     <th class="td_w_100p"><label class="m_b_none l_s_none font_12">Produttore</label></th>
  27.                     <th class="td_w_100p"><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 class="font_12">'.$modelName.'</td>
  34.                     <td class="font_12">'.$producerName.'</td>
  35.                     <td class="font_12">'.$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.         public function getId(): ?string
  82.         {
  83.             return $this->id;
  84.         }
  85.         public function getPhase(): ?string
  86.         {
  87.             return $this->phase;
  88.         }
  89.         public function setPhase(string $phase): static
  90.         {
  91.             $this->phase $phase;
  92.             return $this;
  93.         }
  94.         public function getDatetime(): ?\DateTimeInterface
  95.         {
  96.             return $this->datetime;
  97.         }
  98.         public function setDatetime(?\DateTimeInterface $datetime): static
  99.         {
  100.             $this->datetime $datetime;
  101.             return $this;
  102.         }
  103.         public function getDetails(): ?string
  104.         {
  105.             return $this->details;
  106.         }
  107.         public function setDetails(string $details): static
  108.         {
  109.             $this->details $details;
  110.             return $this;
  111.         }
  112.         public function getNotes(): ?string
  113.         {
  114.             return $this->notes;
  115.         }
  116.         public function setNotes(?string $notes): static
  117.         {
  118.             $this->notes $notes;
  119.             return $this;
  120.         }
  121.         public function getTechnician(): ?User
  122.         {
  123.             return $this->technician;
  124.         }
  125.         public function setTechnician(?User $technician): static
  126.         {
  127.             $this->technician $technician;
  128.             return $this;
  129.         }
  130.         public function getWarehouse(): ?Warehouse
  131.         {
  132.             return $this->warehouse;
  133.         }
  134.         public function setWarehouse(?Warehouse $warehouse): static
  135.         {
  136.             $this->warehouse $warehouse;
  137.             return $this;
  138.         }
  139.         public function getWarehouseHeadquarter(): ?Warehouse
  140.         {
  141.             return $this->warehouseHeadquarter;
  142.         }
  143.         public function setWarehouseHeadquarter(?Warehouse $warehouseHeadquarter): static
  144.         {
  145.             $this->warehouseHeadquarter $warehouseHeadquarter;
  146.             return $this;
  147.         }
  148. }