class StatisticsLastUpdated in Drupal 10
Same name in this branch
- 10 core/modules/comment/src/Plugin/views/filter/StatisticsLastUpdated.php \Drupal\comment\Plugin\views\filter\StatisticsLastUpdated
- 10 core/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php \Drupal\comment\Plugin\views\sort\StatisticsLastUpdated
- 10 core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php \Drupal\comment\Plugin\views\field\StatisticsLastUpdated
Same name and namespace in other branches
- 8 core/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php \Drupal\comment\Plugin\views\sort\StatisticsLastUpdated
- 9 core/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php \Drupal\comment\Plugin\views\sort\StatisticsLastUpdated
Sort handler for the newer of last comment / entity updated.
Plugin annotation
@ViewsSort("comment_ces_last_updated");
Hierarchy
- class \Drupal\views\Plugin\views\sort\SortPluginBase extends \Drupal\views\Plugin\views\HandlerBase implements CacheableDependencyInterface
- class \Drupal\views\Plugin\views\sort\Date
- class \Drupal\comment\Plugin\views\sort\StatisticsLastUpdated
- class \Drupal\views\Plugin\views\sort\Date
Expanded class hierarchy of StatisticsLastUpdated
Related topics
File
- core/
modules/ comment/ src/ Plugin/ views/ sort/ StatisticsLastUpdated.php, line 14
Namespace
Drupal\comment\Plugin\views\sortView source
class StatisticsLastUpdated extends Date {
public function query() {
$this
->ensureMyTable();
$this->node_table = $this->query
->ensureTable('node', $this->relationship);
$this->field_alias = $this->query
->addOrderBy(NULL, "GREATEST(" . $this->node_table . ".changed, " . $this->tableAlias . ".last_comment_timestamp)", $this->options['order'], $this->tableAlias . '_' . $this->field);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Date:: |
public | function |
Basic options for all sort criteria. Overrides SortPluginBase:: |
|
Date:: |
protected | function |
Overrides SortPluginBase:: |
|
SortPluginBase:: |
public | function | Display whether or not the sort order is ascending or descending. | |
SortPluginBase:: |
public | function | ||
SortPluginBase:: |
public | function | Determine if a sort can be exposed. | |
SortPluginBase:: |
public | function | Provide default options for exposed sorts. | |
SortPluginBase:: |
public | function |
The cache contexts associated with this object. Overrides CacheableDependencyInterface:: |
|
SortPluginBase:: |
public | function |
The maximum age for which this object may be cached. Overrides CacheableDependencyInterface:: |
|
SortPluginBase:: |
public | function |
The cache tags associated with this object. Overrides CacheableDependencyInterface:: |
|
SortPluginBase:: |
public | function | Shortcut to display the expose/hide button. | |
SortPluginBase:: |
protected | function | Shortcut to display the value form. | |
SortPluginBase:: |
protected | function | Provide a list of options for the default sort form. | |
SortPluginBase:: |
public | function | ||
SortPluginBase:: |
protected | function | ||
SortPluginBase:: |
public | function | Simple submit handler. | |
SortPluginBase:: |
public static | function | ||
SortPluginBase:: |
public | function | Validate the options form. | |
SortPluginBase:: |
public | function | Simple validate handler. | |
StatisticsLastUpdated:: |
public | function |
Called to add the sort to a query. Overrides Date:: |