public function CityHits::display in Visitors 8.2
Returns a city hits page.
Return value
array A render array representing the city hits page content.
1 string reference to 'CityHits::display'
File
- src/
Controller/ Report/ CityHits.php, line 63 - Contains Drupal\visitors\Controller\Report\CityHits.
Class
Namespace
Drupal\visitors\Controller\ReportCode
public function display($country, $city) {
$form = $this->formBuilder
->getForm('Drupal\\visitors\\Form\\DateFilter');
$header = $this
->_getHeader();
return array(
'#title' => t('Hits from') . ' ' . t($city) . ', ' . t($country),
'visitors_date_filter_form' => $form,
'visitors_table' => array(
'#type' => 'table',
'#header' => $header,
'#rows' => $this
->_getData($header, $country, $city),
),
'visitors_pager' => array(
'#type' => 'pager',
),
);
}