Project

General

Profile

« Previous | Next » 

Revision 63740051

Added by Andreas Kohlbecker over 6 years ago

restructuring description element code

View differences:

modules/cdm_dataportal/includes/descriptions.inc
529 529
         * Content/COMMON_NAME.
530 530
         */
531 531
        else if ($node->feature->uuid == UUID_COMMON_NAME) {
532
          $common_names_render_array = compose_cdm_common_names($node->descriptionElements, $node->feature);
532
          $common_names_render_array = compose_description_elements_common_name($node->descriptionElements, $node->feature);
533 533
          $block->content[] = $common_names_render_array;
534 534
          $block_content_is_empty = FALSE;
535 535
        }
......
817 817
          }
818 818
        }
819 819
        ksort($distributionElements);
820
        $distribution_element_render_array = compose_description_element_distribution($distributionElements);
820
        $distribution_element_render_array = compose_description_elements_distribution($distributionElements);
821 821
        $dto_out_array[] = drupal_render($distribution_element_render_array);
822 822

  
823 823
      }
......
1146 1146
 *
1147 1147
 * @ingroup compose
1148 1148
 */
1149
function compose_cdm_common_names($elements, $feature, $weight = FALSE) {
1149
function compose_description_elements_common_name($elements, $feature, $weight = FALSE) {
1150 1150

  
1151 1151
  $common_name_out = '';
1152 1152
  $common_name_feature_elements = array();
......
1265 1265
   *
1266 1266
   * @ingroup compose
1267 1267
   */
1268
  function compose_description_element_distribution($descriptionElements, $enclosingTag = "span"){
1268
  function compose_description_elements_distribution($descriptionElements){
1269 1269

  
1270 1270
    $out = '';
1271 1271
    RenderHints::pushToRenderStack('descriptionElementDistribution');
1272 1272
    RenderHints::setFootnoteListKey(UUID_DISTRIBUTION);
1273 1273

  
1274 1274
    $feature_block_settings = get_feature_block_settings(UUID_DISTRIBUTION);
1275
    $enclosingTag = cdm_feature_block_element_tag_name($feature_block_settings);
1275 1276

  
1276 1277
    foreach ($descriptionElements as $descriptionElement) {
1277 1278
      $annotations_and_sources = handle_annotations_and_sources(
......
1456 1457
  }
1457 1458

  
1458 1459
  /**
1459
   * this function should produce markup as the compose_description_element_distribution()
1460
   * this function should produce markup as the compose_description_elements_distribution()
1460 1461
   * function.
1461 1462
   *
1462
   * @see compose_description_element_distribution()
1463
   * @see compose_description_elements_distribution()
1463 1464
   *
1464 1465
   * @param $distribution_tree
1465 1466
   * @param $feature_block_settings

Also available in: Unified diff