Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / comment / src / Plugin / views / field / StatisticsLastUpdated.php
1 <?php
2
3 namespace Drupal\comment\Plugin\views\field;
4
5 use Drupal\views\Plugin\views\field\Date;
6
7 /**
8  * Field handler to display the newer of last comment / node updated.
9  *
10  * @ingroup views_field_handlers
11  *
12  * @ViewsField("comment_ces_last_updated")
13  */
14 class StatisticsLastUpdated extends Date {
15
16   public function query() {
17     $this->ensureMyTable();
18     $this->node_table = $this->query->ensureTable('node_field_data', $this->relationship);
19     $this->field_alias = $this->query->addField(NULL, "GREATEST(" . $this->node_table . ".changed, " . $this->tableAlias . ".last_comment_timestamp)", $this->tableAlias . '_' . $this->field);
20   }
21
22 }