summaryrefslogtreecommitdiffstats
path: root/relation.module
diff options
context:
space:
mode:
Diffstat (limited to 'relation.module')
-rw-r--r--relation.module14
1 files changed, 14 insertions, 0 deletions
diff --git a/relation.module b/relation.module
index 8e0168f..0073af3 100644
--- a/relation.module
+++ b/relation.module
@@ -455,6 +455,20 @@ function relation_get_types($types = array()) {
}
/**
+ * Returns all relation types in a way which can be used
+ * on form options.
+ */
+function relation_get_types_options() {
+ $types = relation_get_types();
+ $options = array();
+ foreach ($types as $type => $relation_type) {
+ $options[$type] = $relation_type->label;
+ }
+
+ return $options;
+}
+
+/**
* Helper function. Attaches bundles to relation type objects in an array.
*/
function _relation_get_types_bundles(&$relation_types) {