use UncacheableDependencyTrait;
- // Don't display empty space where the operator would be.
+ /**
+ * {@inheritdoc}
+ */
public $no_operator = TRUE;
/**
return FALSE;
}
+ /**
+ * {@inheritdoc}
+ */
public function buildExposeForm(&$form, FormStateInterface $form_state) {
parent::buildExposeForm($form, $form_state);
// @todo There are better ways of excluding required and multiple (object flags)
unset($form['expose']['remember']);
}
+ /**
+ * {@inheritdoc}
+ */
protected function valueForm(&$form, FormStateInterface $form_state) {
// Only present a checkbox for the exposed filter itself. There's no way
// to tell the difference between not checked and the default value, so
}
}
+ /**
+ * {@inheritdoc}
+ */
public function query() {
// This can only work if we're authenticated in.
if (!\Drupal::currentUser()->isAuthenticated()) {
// Hey, Drupal kills old history, so nodes that haven't been updated
// since HISTORY_READ_LIMIT are bzzzzzzzt outta here!
-
$limit = REQUEST_TIME - HISTORY_READ_LIMIT;
$this->ensureMyTable();
$clause = '';
$clause2 = '';
- if ($ces = $this->query->ensureTable('comment_entity_statistics', $this->relationship)) {
- $clause = ("OR $ces.last_comment_timestamp > (***CURRENT_TIME*** - $limit)");
- $clause2 = "OR $field < $ces.last_comment_timestamp";
+ if ($alias = $this->query->ensureTable('comment_entity_statistics', $this->relationship)) {
+ $clause = "OR $alias.last_comment_timestamp > (***CURRENT_TIME*** - $limit)";
+ $clause2 = "OR $field < $alias.last_comment_timestamp";
}
// NULL means a history record doesn't exist. That's clearly new content.
$this->query->addWhereExpression($this->options['group'], "($field IS NULL AND ($node.changed > (***CURRENT_TIME*** - $limit) $clause)) OR $field < $node.changed $clause2");
}
+ /**
+ * {@inheritdoc}
+ */
public function adminSummary() {
if (!empty($this->options['exposed'])) {
return $this->t('exposed');