Project

General

Profile

« Previous | Next » 

Revision be14d958

Added by Andreas Kohlbecker over 2 years ago

ref #9897 support for AnnotationDTO class

View differences:

modules/cdm_dataportal/includes/footnotes.inc
135 135
  }
136 136

  
137 137
  // Adding the footnotes keys.
138
  $annotations = cdm_fetch_visible_annotations($cdm_entity);
139
  if (is_array($annotations)) {
140
    foreach ($annotations as $annotation) {
141
      $foot_note_keys[] = FootnoteManager::addNewFootnote($footnote_list_key, $annotation->text);
138
  $annotations_or_dtos = cdm_fetch_visible_annotations($cdm_entity);
139
  if (is_array($annotations_or_dtos)) {
140
    foreach ($annotations_or_dtos as $annotation_or_dto) {
141
      $foot_note_keys[] = FootnoteManager::addNewFootnote($footnote_list_key, $annotation_or_dto->text);
142 142
    }
143 143
  }
144 144

  
......
157 157
function cdm_entity_annotations_as_content(stdClass $cdm_entity) {
158 158

  
159 159
  $annotation_texts = [];
160
  $annotations = cdm_fetch_visible_annotations($cdm_entity);
161
  if (is_array($annotations)) {
162
    foreach ($annotations as $annotation) {
163
      if($annotation->text){
164
        $annotation_texts[] = $annotation->text;
160
  $annotations_or_dtos = cdm_fetch_visible_annotations($cdm_entity);
161
  if (is_array($annotations_or_dtos)) {
162
    foreach ($annotations_or_dtos as $annotation_or_dto) {
163
      if($annotation_or_dto->text){
164
        $annotation_texts[] = $annotation_or_dto->text;
165 165
      }
166 166
    }
167 167
  }

Also available in: Unified diff