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