529 |
529 |
* Content/COMMON_NAME.
|
530 |
530 |
*/
|
531 |
531 |
else if ($node->feature->uuid == UUID_COMMON_NAME) {
|
532 |
|
$common_names_render_array = compose_description_elements_common_name($node->descriptionElements, $node->feature);
|
|
532 |
$common_names_render_array = compose_feature_block_items_feature_common_name($node->descriptionElements, $node->feature);
|
533 |
533 |
$block->content[] = $common_names_render_array;
|
534 |
534 |
$block_content_is_empty = FALSE;
|
535 |
535 |
}
|
... | ... | |
553 |
553 |
if(isset($taxon) ) {
|
554 |
554 |
$taxon_uuid = $taxon->uuid;
|
555 |
555 |
}
|
556 |
|
$elements_render_array = compose_description_elements_other_features($node->descriptionElements, $node->feature, $taxon_uuid);
|
|
556 |
$elements_render_array = compose_feature_block_items_generic($node->descriptionElements, $node->feature, $taxon_uuid);
|
557 |
557 |
$block_content_is_empty = empty($elements_render_array);
|
558 |
558 |
$block->content[] = $elements_render_array;
|
559 |
559 |
}
|
... | ... | |
573 |
573 |
if (isset($child->descriptionElements) && is_array($child->descriptionElements)) {
|
574 |
574 |
foreach ($child->descriptionElements as $element) {
|
575 |
575 |
|
576 |
|
//TODO it woud be better if we could use compose_description_elements_other_features() directly instead of the below stuff
|
|
576 |
//TODO it woud be better if we could use compose_feature_block_items_generic() directly instead of the below stuff
|
577 |
577 |
|
578 |
578 |
if (is_array($element->media)) {
|
579 |
579 |
// Append media of subordinate elements to list of main
|
... | ... | |
851 |
851 |
|
852 |
852 |
|
853 |
853 |
/**
|
854 |
|
* Composes a drupal render array for CDM TextData description elements.
|
|
854 |
* Composes a drupal render array for single CDM TextData description element.
|
855 |
855 |
*
|
856 |
856 |
* @param $element
|
857 |
|
* The CDM TextData description element which contains the textual information.
|
|
857 |
* The CDN TextData description element.
|
858 |
858 |
* @param $asListElement
|
859 |
859 |
* A boolean which determines whether the citations should
|
860 |
860 |
* be rendered as a list or not.
|
... | ... | |
1048 |
1048 |
*
|
1049 |
1049 |
* @ingroup compose
|
1050 |
1050 |
*/
|
1051 |
|
function compose_description_elements_other_features($descriptionElements, $feature) {
|
|
1051 |
function compose_feature_block_items_generic($descriptionElements, $feature) {
|
1052 |
1052 |
|
1053 |
1053 |
$render_array = array();
|
1054 |
1054 |
$elements_out_array = array();
|
... | ... | |
1138 |
1138 |
*
|
1139 |
1139 |
* @ingroup compose
|
1140 |
1140 |
*/
|
1141 |
|
function compose_description_elements_common_name($elements, $feature, $weight = FALSE) {
|
|
1141 |
function compose_feature_block_items_feature_common_name($elements, $feature, $weight = FALSE) {
|
1142 |
1142 |
|
1143 |
1143 |
$common_name_out = '';
|
1144 |
1144 |
$common_name_feature_elements = array();
|
... | ... | |
1245 |
1245 |
}
|
1246 |
1246 |
|
1247 |
1247 |
/**
|
1248 |
|
* Composes the render array for a CDM Distribution element
|
|
1248 |
* Composes the render array for a CDM Distribution description element
|
1249 |
1249 |
*
|
1250 |
|
* @param $descriptionElements
|
1251 |
|
* The CDM Distribution element
|
|
1250 |
* @param array $descriptionElements
|
|
1251 |
* Array of CDM Distribution instances
|
1252 |
1252 |
* @param $enclosingTag
|
1253 |
1253 |
* The html tag to be use for the enclosing element
|
1254 |
1254 |
*
|
restructuring description element code