Coverage index

src/Plugin/views/sort/VisitorsTimestamp.php

Lines: 100.00%

LineHitsSource
1
<?php
2
3
namespace Drupal\visitors\Plugin\views\sort;
4
5
use Drupal\views\Attribute\ViewsSort;
6
use Drupal\views\Plugin\views\sort\SortPluginBase;
7
use Drupal\visitors\Service\SequenceService;
8
9
/**
10
 * Sort handler for days of the week respecting system first day setting.
11
 */
12
#[ViewsSort("visitors_timestamp")]
13
class VisitorsTimestamp extends SortPluginBase {
14
15
  /**
16
   * {@inheritdoc}
17
   */
18
  public function query() {
191
    $this->ensureMyTable();
20
21
    /** @var \Drupal\views\Plugin\views\query\Sql $query */
221
    $query = $this->query;
231
    $query->addOrderBy(NULL, NULL, $this->options['order'], $this->field);
24
  }
25
26
  /**
27
   * {@inheritdoc}
28
   */
29
  public function postExecute(&$values) {
301
    $values = SequenceService::fill($values);
31
  }
32
33
}