public function render($empty = FALSE
) { // Must have options and does not work on summaries.
if (!
isset($this->options
['content'
]) ||
$this->view->style_plugin instanceof DefaultSummary
) { return [];
} $output = '';
$format =
$this->options
['content'
];
// Calculate the page totals.
$current_page =
(int) $this->view->
getCurrentPage() + 1;
$per_page =
(int) $this->view->
getItemsPerPage();
// @TODO: Maybe use a possible is views empty functionality.
// Not every view has total_rows set, use view->result instead.
$total =
$this->view->total_rows ??
count($this->view->result
);
$label = Html::
escape($this->view->storage->
label());
// If there is no result the "start" and "current_record_count" should be
// equal to 0. To have the same calculation logic, we use a "start offset"
// to handle all the cases.
$start_offset =
empty($total) ? 0 : 1;
if ($per_page === 0
) { $page_count = 1;
$start =
$start_offset;