function tripal_feature_get_aggregate_relationships
2.x tripal_feature.theme.inc | tripal_feature_get_aggregate_relationships($feature_id, $substitute = 1,
$levels = 0, $base_type_id = NULL, $depth = 0) |
3.x tripal_feature.theme.inc | tripal_feature_get_aggregate_relationships($feature_id, $substitute = 1,
$levels = 0, $base_type_id = NULL, $depth = 0) |
1.x tripal_feature.module | tripal_feature_get_aggregate_relationships($feature_id, $substitute = 1,
$levels = 0, $base_type_id = NULL, $depth = 0) |
Get features related to the current feature to a given depth. Recursive function.
Parameters
$feature_id:
$substitute:
$levels:
$base_type_id:
$depth:
Related topics
2 calls to tripal_feature_get_aggregate_relationships()
- tripal_feature_load_featurelocs in tripal_feature/
theme/ tripal_feature.theme.inc - Load the locations for a given feature
- tripal_feature_load_featureloc_sequences in tripal_feature/
theme/ tripal_feature.theme.inc - Get the sequence this feature is located on
File
- tripal_feature/
theme/ tripal_feature.theme.inc, line 289
Code
function tripal_feature_get_aggregate_relationships($feature_id, $substitute = 1,
$levels = 0, $base_type_id = NULL, $depth = 0) {
// we only want to recurse to as many levels deep as indicated by the
// $levels variable, but only if this variable is > 0. If 0 then we
// recurse until we reach the end of the relationships tree.
if ($levels > 0 and $levels == $depth) {
return NULL;
}
// first get the relationships for this feature
return tripal_feature_load_relationships($feature_id, 'as_object');
}