Hello,
I have made a plugin in which I m listing all files entities of a user in a table and that table will sort and search based on the entity title and its metadata's , but there is no option in elgg to sort metadata, my current code is :
$entities = elgg_get_entities(array('type' => 'object', 'subtype' => 'file', 'owner_guid' => $owner_guid, 'limi' => $limit, 'offset' => $offset));
foreach($entities as $entity)
{
$simpletype = elgg_get_metadata_byname('simpletype', $entity->guid);
$filename = elgg_get_metadata_byname('filename', $entity->guid);
}
this is getting correctly in the table , but there is function in elgg to order the entities using meta data, so basically what I want to do to that I be able to sort these entities based on all these values , title , simpletype and filename . Is there a function in elgg now ? If not can someone devise me something ?
Thanks,
Aimash
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Cash@costelloc

Cash - 0 likes
You must log in to post replies.elgg_get_entities_from_metadata