entity.php 424 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Elgg Entity export.
  4. * Displays an entity as JSON
  5. *
  6. * @package Elgg
  7. * @subpackage Core
  8. * @deprecated 1.9
  9. */
  10. $entity = $vars['entity'];
  11. $export = new stdClass;
  12. $exportable_values = $entity->getExportableValues();
  13. foreach ($exportable_values as $v) {
  14. $export->$v = $entity->$v;
  15. }
  16. $export->url = $entity->getURL();
  17. global $jsonexport;
  18. $jsonexport[$entity->getType()][$entity->getSubtype()][] = $export;