listing.php 842 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * List entities by category
  4. *
  5. * @package ElggCategories
  6. */
  7. $limit = get_input("limit", elgg_get_config('default_limit'));
  8. $offset = get_input("offset", 0);
  9. $category = get_input("category");
  10. $owner_guid = get_input("owner_guid", ELGG_ENTITIES_ANY_VALUE);
  11. $subtype = get_input("subtype", ELGG_ENTITIES_ANY_VALUE);
  12. $type = get_input("type", 'object');
  13. $title = elgg_echo('categories:results', array($category));
  14. $params = array(
  15. 'metadata_name' => 'universal_categories',
  16. 'metadata_value' => $category,
  17. 'type' => $type,
  18. 'subtype' => $subtype,
  19. 'owner_guid' => $owner_guid,
  20. 'full_view' => FALSE,
  21. 'metadata_case_sensitive' => FALSE,
  22. );
  23. $content = elgg_list_entities_from_metadata($params);
  24. $body = elgg_view_layout('one_sidebar', array(
  25. 'title' => $title,
  26. 'content' => $content
  27. ));
  28. echo elgg_view_page($title, $body);