Exemplo n.º 1
0
 function mapDocs($object, $with_cancelled, $tri)
 {
     // Documents et fichiers
     $object->loadRefsDocItems($with_cancelled);
     CStoredObject::massLoadFwdRef($object->_ref_documents, "file_category_id");
     foreach ($object->_ref_documents as $_doc) {
         CDocumentItem::makeIconName($_doc);
         $_doc->loadContent(false);
         $_doc->loadRefCategory();
         $_doc->_ref_object = $object;
         $this->_all_docs[$this->makePrefix($tri, $object, $_doc)][] = $_doc;
     }
     CStoredObject::massLoadFwdRef($object->_ref_files, "file_category_id");
     foreach ($object->_ref_files as $_file) {
         CDocumentItem::makeIconName($_file);
         $_file->loadRefCategory();
         $_file->_ref_object = $object;
         $this->_all_docs[$this->makePrefix($tri, $object, $_file)][] = $_file;
     }
     // Formulaires
     $ex_link = new CExLink();
     $ex_link->setObject($object);
     $ex_link->level = "object";
     $ex_links = $ex_link->loadMatchingList();
     $ex_objects = CExLink::massLoadExObjects($ex_links);
     CStoredObject::massLoadFwdRef($ex_objects, "object_id");
     foreach ($ex_links as $_link) {
         $_ex = $_link->loadRefExObject();
         $_ex->updateCreationFields();
         $object = $_ex->loadTargetObject();
         $_ex->_ex_class_id = $_link->ex_class_id;
         $_ex->loadRefExClass();
         CDocumentItem::makeIconName($_ex->_ref_ex_class);
         $this->_all_docs[$this->makePrefix($tri, $object, $_ex)][] = $_link;
     }
 }
Exemplo n.º 2
0
 /**
  * @see parent::getSendProblem()
  */
 function getSendProblem(CDocumentItem $docItem)
 {
     $docItem->loadTargetObject();
     if ($docItem->_ref_object instanceof COperation || $docItem->_ref_object instanceof CSejour || $docItem->_ref_object instanceof CConsultation || $docItem->_ref_object instanceof CConsultAnesth) {
         return;
     }
     return sprintf("Type d'objet '%s' non pris en charge", CAppUI::tr($docItem->_ref_object->_class));
 }
Exemplo n.º 3
0
 /**
  * @see parent::handleSend()
  */
 function handleSend()
 {
     $this->completeField("file_name");
     $this->completeField("file_real_filename");
     $this->completeField("file_type");
     $this->completeField("file_date");
     $this->updateFormFields();
     return parent::handleSend();
 }
 /**
  * Envoi de document
  * 
  * @return string|null
  */
 function handleSend()
 {
     if (!$this->_send) {
         return null;
     }
     $this->loadFile();
     $this->completeField("nom", "_source");
     return parent::handleSend();
 }