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