Revision aaa81689
Added by Andreas Kohlbecker almost 8 years ago
modules/cdm_dataportal/cdm_api/cdm_api.module | ||
---|---|---|
1210 | 1210 |
* @param string $ignore_rank_limit |
1211 | 1211 |
* Whether to ignore the variable 'taxontree_ranklimit' set by admin in the settings |
1212 | 1212 |
* |
1213 |
* @return A cdm REST service URL path to a Classification |
|
1213 |
* @return string |
|
1214 |
* A cdm REST service URL path to a Classification |
|
1214 | 1215 |
*/ |
1215 | 1216 |
function cdm_compose_taxonomy_root_level_path($taxon_uuid = FALSE, $ignore_rank_limit = FALSE) { |
1216 | 1217 |
|
1217 | 1218 |
$view_uuid = get_current_classification_uuid(); |
1218 | 1219 |
$rank_uuid = NULL; |
1219 | 1220 |
if (!$ignore_rank_limit) { |
1220 |
$rank_uuid = variable_get('taxontree_ranklimit', DEFAULT_TAXONTREE_RANKLIMIT);
|
|
1221 |
$rank_uuid = variable_get(TAXONTREE_RANKLIMIT, TAXONTREE_RANKLIMIT_DEFAULT);
|
|
1221 | 1222 |
} |
1222 | 1223 |
|
1223 | 1224 |
if (!empty($taxon_uuid)) { |
... | ... | |
1227 | 1228 |
)); |
1228 | 1229 |
} |
1229 | 1230 |
else { |
1230 |
if (!empty($rank_uuid)) {
|
|
1231 |
if (is_uuid($rank_uuid)) {
|
|
1231 | 1232 |
return cdm_compose_url(CDM_WS_PORTAL_TAXONOMY_CHILDNODES_AT_RANK, array( |
1232 | 1233 |
$view_uuid, |
1233 | 1234 |
$rank_uuid, |
... | ... | |
1301 | 1302 |
} |
1302 | 1303 |
|
1303 | 1304 |
/** |
1304 |
* @todo Enter description here... |
|
1305 |
* Determines the tree path of the taxon given as uuid to the root of the classification tree. |
|
1306 |
* |
|
1307 |
* The root either is the absolute root of the tree or a rank specific root if the TAXONTREE_RANKLIMIT |
|
1308 |
* variable is set. |
|
1305 | 1309 |
* |
1306 | 1310 |
* @param string $taxon_uuid |
1307 | 1311 |
* |
1308 | 1312 |
* @return array |
1313 |
* An array of CDM TaxonNodeDTO objects |
|
1309 | 1314 |
*/ |
1310 | 1315 |
function cdm_ws_taxonomy_pathFromRoot($taxon_uuid) { |
1311 | 1316 |
$view_uuid = get_current_classification_uuid(); |
1312 |
$rank_uuid = variable_get('taxontree_ranklimit', DEFAULT_TAXONTREE_RANKLIMIT);
|
|
1317 |
$rank_uuid = variable_get(TAXONTREE_RANKLIMIT, TAXONTREE_RANKLIMIT_DEFAULT);
|
|
1313 | 1318 |
|
1314 | 1319 |
$response = NULL; |
1315 |
if ($rank_uuid) {
|
|
1320 |
if (is_uuid($rank_uuid)) {
|
|
1316 | 1321 |
$response = cdm_ws_get(CDM_WS_PORTAL_TAXONOMY_PATH_FROM_TO_RANK, array( |
1317 | 1322 |
$view_uuid, |
1318 | 1323 |
$taxon_uuid, |
Also available in: Unified diff
no rank limit as default to avoid performance problems