public function Field($properties = array())
 {
     $items = $this->getItems();
     $unprocessed = false;
     $messages = array();
     // check that all the items have been uploaded
     foreach ($items as $vFile) {
         if ($vFile->ProcessStatus != VuforiaImage::COMPLETE_STATUS) {
             // do a status check
             $update = $this->vuforiaAPIService->checkImageStatus($vFile);
             if ($update->ProcessStatus == VuforiaImage::PROCESS_STATUS) {
                 $unprocessed = true;
             }
             if ($update->ProcessStatus == VuforiaImage::ERROR_STATUS) {
                 $messages[] = $update->Messages;
             }
         }
     }
     //
     //		if (count($messages)) {
     //			$field .= '<div class="vuforia-messages" style="padding: 3px; color: #f33">' . implode('<br/>', $messages) . '</div>';
     //		}
     //
     $field = parent::Field($properties);
     return $field;
 }
 public function onAfterSerialize(&$formattedDataObjectMap)
 {
     $result = $this->vuforiaAPIService->checkImageStatus($this);
     if ($data = $result->VuforiaData) {
         $formatedData = json_decode($data);
         $formattedDataObjectMap["VuforiaData"] = $formatedData;
     }
 }
 public function onAfterUpload()
 {
     parent::onAfterUpload();
     if (!$this->TargetWidth) {
         return;
     }
     $existing = $this->getVuforiaInfo();
     if ($existing) {
         // update the remote
         $this->vuforiaAPIService->updateTarget($this);
     }
 }