Project

General

Profile

« Previous | Next » 

Revision db725031

Added by Andreas Kohlbecker about 4 years ago

ref #7495 Registration page implemented

View differences:

modules/cdm_dataportal/cdm_dataportal.module
1318 1318
 * also subordinate objects will be converted.
1319 1319
 *
1320 1320
 * @param object $object
1321
 * @return the array
1321
 *  the object to be converted
1322
 * @return array
1323
 *  The array
1322 1324
 */
1323
function convert_to_array($object) {
1325
function object_to_array($object) {
1324 1326
  if(is_object($object) || is_array($object)) {
1325 1327
    $array = (array)$object;
1326 1328
    foreach ($array as $key=>$value){
1327
      $array[$key] = convert_to_array($value);
1329
      $array[$key] = object_to_array($value);
1328 1330
    }
1329 1331
    return $array;
1330 1332
  } else {
......
1847 1849
      . "</br>&nbsp;</div>");
1848 1850
    $render_array['summary'] = markup_to_render_array("<div>" . cdm_tagged_text_to_markup($registration_dto->summaryTaggedText) . "</div>");
1849 1851

  
1850
//    $registration = cdm_ws_get("registration/identifier/" . $registration_identifier_encoded);
1851
//    if(is_array($registration->typeDesignations)){
1852
//      $type_designations_markup = "";
1853
//      foreach ($registration->typeDesignations as $type_designation){
1854
//        $type_designations_markup .= render_cdm_specimen($type_designation);
1855
//      }
1856
//      $render_array['type_designations'] = markup_to_render_array($type_designations_markup);
1857
//    }
1852
    if(is_object($registration_dto->orderdTypeDesignationWorkingSets)){
1853

  
1854
      $field_unit_uuids = array();
1855
      foreach((array)$registration_dto->orderdTypeDesignationWorkingSets as $field_unit_ref => $obj){
1856
        $tokens = explode("#", $field_unit_ref);
1857
        $field_unit_uuids[] = $tokens[1];
1858
      }
1859
      $render_array['specimen_table'] = compose_derivate_hierarchy_table($field_unit_uuids);
1860
    }
1858 1861

  
1859 1862
  } else {
1860 1863
    drupal_set_title(t('Registration not found'), PASS_THROUGH);

Also available in: Unified diff