3 namespace Drupal\comment\Plugin\views\filter;
5 use Drupal\views\Plugin\views\filter\Date;
8 * Filter handler for the newer of last comment / node updated.
10 * @ingroup views_filter_handlers
12 * @ViewsFilter("comment_ces_last_updated")
14 class StatisticsLastUpdated extends Date {
16 public function query() {
17 $this->ensureMyTable();
18 $this->node_table = $this->query->ensureTable('node', $this->relationship);
20 $field = "GREATEST(" . $this->node_table . ".changed, " . $this->tableAlias . ".last_comment_timestamp)";
22 $info = $this->operators();
23 if (!empty($info[$this->operator]['method'])) {
24 $this->{$info[$this->operator]['method']}($field);