10 $header .=
'<th>' .
elgg_echo(
'admin:statistics:queue:newest') .
'</th></tr>';
12 $qb = Select::fromTable(DatabaseQueue::TABLE_NAME);
13 $qb->select(
'DISTINCT name');
22 $qb = Select::fromTable(DatabaseQueue::TABLE_NAME);
23 $qb->select(
'COUNT(*) AS total');
27 $row_count = empty($row_count) ? 0 : (int) $row_count->total;
29 $qb = Select::fromTable(DatabaseQueue::TABLE_NAME);
30 $qb->select(
'MIN(timestamp) AS min');
34 $oldest = empty($oldest) ? 0 : (int) $oldest->min;
35 $oldest =
elgg_view(
'output/datetime-local', [
'value' => $oldest]);
37 $qb = Select::fromTable(DatabaseQueue::TABLE_NAME);
38 $qb->select(
'MAX(timestamp) AS max');
42 $newest = empty($newest) ? 0 : (int) $newest->max;
43 $newest =
elgg_view(
'output/datetime-local', [
'value' => $newest]);
45 $rows .=
"<tr><td>{$queue->name}</td><td>{$row_count}</td><td>{$oldest}</td><td>{$newest}</td></tr>";
48 $body =
"<table class='elgg-table'><thead>{$header}</thead><tbody>{$rows}</tbody></table>";
elgg_view_module(string $type, string $title, string $body, array $vars=[])
Wrapper function for the module display pattern.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
if(empty($queue_names)) $rows
foreach($queue_names as $queue) $body
_elgg_services()
Get the global service provider.