3 namespace Drupal\comment\Plugin\views\field;
5 use Drupal\views\Plugin\views\field\Date;
8 * Field handler to display the newer of last comment / node updated.
10 * @ingroup views_field_handlers
12 * @ViewsField("comment_ces_last_updated")
14 class StatisticsLastUpdated extends Date {
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);