You are here

class StatisticsLastUpdated in Drupal 10

Same name in this branch
  1. 10 core/modules/comment/src/Plugin/views/filter/StatisticsLastUpdated.php \Drupal\comment\Plugin\views\filter\StatisticsLastUpdated
  2. 10 core/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php \Drupal\comment\Plugin\views\sort\StatisticsLastUpdated
  3. 10 core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php \Drupal\comment\Plugin\views\field\StatisticsLastUpdated
Same name and namespace in other branches
  1. 8 core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php \Drupal\comment\Plugin\views\field\StatisticsLastUpdated
  2. 9 core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php \Drupal\comment\Plugin\views\field\StatisticsLastUpdated

Field handler to display the newer of last comment / node updated.

Plugin annotation

@ViewsField("comment_ces_last_updated");

Hierarchy

  • class \Drupal\views\Plugin\views\field\Date extends \Drupal\views\Plugin\views\field\FieldPluginBase

Expanded class hierarchy of StatisticsLastUpdated

File

core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php, line 14

Namespace

Drupal\comment\Plugin\views\field
View source
class StatisticsLastUpdated extends Date {
  public function query() {
    $this
      ->ensureMyTable();
    $this->node_table = $this->query
      ->ensureTable('node_field_data', $this->relationship);
    $this->field_alias = $this->query
      ->addField(NULL, "GREATEST(" . $this->node_table . ".changed, " . $this->tableAlias . ".last_comment_timestamp)", $this->tableAlias . '_' . $this->field);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Date::$dateFormatStorage protected property The date format storage.
Date::$dateFormatter protected property The date formatter service.
Date::buildOptionsForm public function
Date::create public static function
Date::defineOptions protected function
Date::render public function 1
Date::__construct public function Constructs a new Date object.
StatisticsLastUpdated::query public function