Exemple #1
0
 /**
  * @ORM\PreFlush()
  */
 public function upload()
 {
     if ($this->uploadedFiles) {
         foreach ($this->uploadedFiles as $uploadedFile) {
             if ($uploadedFile) {
                 $file = new OrderDocuments();
                 $file->upload($uploadedFile);
                 $this->getOrderDocuments()->add($file);
                 $file->setOrderRef($this);
                 unset($uploadedFile);
             }
         }
     }
 }
Exemple #2
0
 /**
  * Add orderDocuments
  *
  * @param \MeVisa\ERPBundle\Entity\OrderDocuments $orderDocuments
  * @return Orders
  */
 public function addOrderDocument(\MeVisa\ERPBundle\Entity\OrderDocuments $orderDocuments)
 {
     $this->orderDocuments[] = $orderDocuments;
     $orderDocuments->setOrderRef($this);
     return $this;
 }