Lines: 100.00%
| Line | Hits | Source |
|---|---|---|
| 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() { | |
| 19 | 1 | $this->ensureMyTable(); |
| 20 | ||
| 21 | /** @var \Drupal\views\Plugin\views\query\Sql $query */ | |
| 22 | 1 | $query = $this->query; |
| 23 | 1 | $query->addOrderBy(NULL, NULL, $this->options['order'], $this->field); |
| 24 | } | |
| 25 | ||
| 26 | /** | |
| 27 | * {@inheritdoc} | |
| 28 | */ | |
| 29 | public function postExecute(&$values) { | |
| 30 | 1 | $values = SequenceService::fill($values); |
| 31 | } | |
| 32 | ||
| 33 | } |