You are here

public function Node::display in Visitors 8.2

Returns a recent hits page.

Return value

array A render array representing the recent hits page content.

1 string reference to 'Node::display'
visitors.routing.yml in ./visitors.routing.yml
visitors.routing.yml

File

src/Controller/Report/Node.php, line 65
Contains Drupal\visitors\Controller\Report\Node.

Class

Node

Namespace

Drupal\visitors\Controller\Report

Code

public function display(NodeInterface $node) {
  $form = $this->formBuilder
    ->getForm('Drupal\\visitors\\Form\\DateFilter');
  $header = $this
    ->_getHeader();
  return array(
    'visitors_date_filter_form' => $form,
    'visitors_table' => array(
      '#type' => 'table',
      '#header' => $header,
      '#rows' => $this
        ->_getData($header, $node),
    ),
    'visitors_pager' => array(
      '#type' => 'pager',
    ),
  );
}