145 |
145 |
} else {
|
146 |
146 |
RenderHints::pushToRenderStack('other_taxon_relationship');
|
147 |
147 |
// All relationship types except misapplied_name_for and invalid_designation_for.
|
148 |
|
$taxon_relationships_lines[] = cdm_taxonRelationship($taxon_relation, TRUE, _is_invers_taxonRelationship($taxon_relation, $focusedTaxon));
|
|
148 |
$taxon_relationships_lines[] = cdm_tagged_text_to_markup($taxon_relation->taggedText);
|
149 |
149 |
}
|
150 |
150 |
RenderHints::popFromRenderStack();
|
151 |
151 |
}
|
... | ... | |
236 |
236 |
return $out;
|
237 |
237 |
}
|
238 |
238 |
|
239 |
|
|
240 |
|
/**
|
241 |
|
* Renders a representation of the given taxon relationship.
|
242 |
|
*
|
243 |
|
* According name relationships are also being rendered.
|
244 |
|
*
|
245 |
|
* @param $taxonRelationship
|
246 |
|
* @param boolean $doLinkTaxon
|
247 |
|
* whether to create a link to the related taxon
|
248 |
|
* @param boolean $inverse
|
249 |
|
* whether the $taxonRelationship should be treaded as invers relation
|
250 |
|
*
|
251 |
|
* @return string
|
252 |
|
*
|
253 |
|
*/
|
254 |
|
function cdm_taxonRelationship($taxonRelationship, $doLinkTaxon = FALSE, $inverse = FALSE) {
|
255 |
|
|
256 |
|
// Validate object.
|
257 |
|
if (!(isset($taxonRelationship->toTaxon) && isset($taxonRelationship->fromTaxon) && isset($taxonRelationship->type))) {
|
258 |
|
return null;
|
259 |
|
}
|
260 |
|
|
261 |
|
$taxonRelationType = $taxonRelationship->type;
|
262 |
|
|
263 |
|
if ($inverse) {
|
264 |
|
$toTaxon = $taxonRelationship->fromTaxon;
|
265 |
|
$relsign = $taxonRelationType->inverseSymbol;
|
266 |
|
$reltype_representation = $taxonRelationType->inverseRepresentation_L10n;
|
267 |
|
}
|
268 |
|
else {
|
269 |
|
$toTaxon = $taxonRelationship->toTaxon;
|
270 |
|
$relsign = $taxonRelationType->symbol;
|
271 |
|
$reltype_representation = $taxonRelationType->representation_L10n;
|
272 |
|
}
|
273 |
|
|
274 |
|
return cdm_related_taxon($toTaxon, NULL, $relsign, $reltype_representation, $taxonRelationship->doubtful, $doLinkTaxon);
|
275 |
|
}
|
276 |
|
|
277 |
239 |
/**
|
278 |
240 |
* Renders a representation of the given taxon relationship.
|
279 |
241 |
*
|
ref #7658 using the taxonRelationDTO for other relationshipt also - footnotes are missing