aboutsummaryrefslogtreecommitdiff
path: root/views/json/export/relationship.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/json/export/relationship.php')
-rw-r--r--views/json/export/relationship.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/views/json/export/relationship.php b/views/json/export/relationship.php
new file mode 100644
index 000000000..47b3a390d
--- /dev/null
+++ b/views/json/export/relationship.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Elgg relationship export.
+ * Displays a relationship using JSON.
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$r = $vars['relationship'];
+
+$export = new stdClass;
+
+$exportable_values = $entity->getExportableValues();
+
+foreach ($exportable_values as $v) {
+ $export->$v = $r->$v;
+}
+
+global $jsonexport;
+$jsonexport['relationships'][] = $export; \ No newline at end of file