28 'selects' => [
'COUNT(*) as cnt'],
30 'group_by' => [
'e.type',
'e.subtype'],
35 if (!empty($grouped_entities)) {
36 foreach ($grouped_entities as
$entity) {
37 $type = $entity->getType();
61 $where = new \Elgg\Database\Clauses\EntityWhereClause();
62 $where->type_subtype_pairs = [
66 if ($show_deactivated) {
67 $where->use_enabled_clause =
false;
70 $select = \Elgg\Database\Select::fromTable(
'entities',
'e');
71 $select->select(
'COUNT(DISTINCT e.guid) AS count');
72 $select->addClause($where,
'e');
108 elgg_extend_view(
'core/settings/statistics',
'core/settings/statistics/online');
109 elgg_extend_view(
'core/settings/statistics',
'core/settings/statistics/numentities');
116 $events->registerHandler(
'init',
'system',
'statistics_init');
get_entity_statistics($owner_guid=0)
Return an array reporting the number of various entities in the system.
get_online_users(array $options=[])
Render a list of currently online users.
elgg_list_entities(array $options=[], $getter= 'elgg_get_entities', $viewer= 'elgg_view_entity_list')
Returns a string of rendered entities.
statistics_init()
Initialise the statistics admin page.
Base class for events and hooks.
elgg_get_entities(array $options=[])
Fetches/counts entities or performs a calculation on their properties.
const ELGG_ENTITIES_ANY_VALUE
elgg_extend_view($view, $view_extension, $priority=501)
Extends a view with another view.
Extends QueryBuilder with ORDER BY clauses.
_elgg_services()
Get the global service provider.
get_number_users($show_deactivated=false)
Return the number of users registered in the system.