Elgg\Database\RelationshipsTable::getEntitiesFromCount PHP Метод

getEntitiesFromCount() публичный Метод

This is a good way to get out the users with the most friends, or the groups with the most members.
public getEntitiesFromCount ( array $options = [] ) : ElggEntity[] | integer | boolean
$options array An options array compatible with elgg_get_entities_from_relationship()
Результат ElggEntity[] | integer | boolean If count, int. If not count, array. false on errors.
    public function getEntitiesFromCount(array $options = array())
    {
        $options['selects'][] = "COUNT(e.guid) as total";
        $options['group_by'] = 'r.guid_two';
        $options['order_by'] = 'total desc';
        return $this->getEntities($options);
    }