aboutsummaryrefslogtreecommitdiff
path: root/views/php/export/entity.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/php/export/entity.php')
-rw-r--r--views/php/export/entity.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/views/php/export/entity.php b/views/php/export/entity.php
new file mode 100644
index 000000000..d2bcc0d58
--- /dev/null
+++ b/views/php/export/entity.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Elgg Entity export.
+ * Displays an entity as PHP serialised data
+ *
+ * @package Elgg
+ * @subpackage Core
+ */
+
+$entity = $vars['entity'];
+
+$export = new stdClass;
+$exportable_values = $entity->getExportableValues();
+
+foreach ($exportable_values as $v) {
+ $export->$v = $entity->$v;
+}
+
+echo serialize($export);