Example #1
0
 public function loadDataStructure(Revision $revision)
 {
     $data = new DataField();
     $data->setFieldType($revision->getContentType()->getFieldType());
     $data->setOrderKey($revision->getContentType()->getFieldType()->getOrderKey());
     $revision->setDataField($data);
     $revision->getDataField()->updateDataStructure($revision->getContentType()->getFieldType());
     $object = $revision->getRawData();
     $data->updateDataValue($object);
     if (count($object) > 0) {
         $html = DataService::arrayToHtml($object);
         $this->session->getFlashBag()->add('warning', "Some data of this revision were not consumed by the content type:" . $html);
     }
 }