class StatisticsLastUpdated
Same name in this branch
- 9 core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php \Drupal\comment\Plugin\views\field\StatisticsLastUpdated
- 9 core/modules/comment/src/Plugin/views/filter/StatisticsLastUpdated.php \Drupal\comment\Plugin\views\filter\StatisticsLastUpdated
Same name and namespace in other branches
- 11.x core/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php \Drupal\comment\Plugin\views\sort\StatisticsLastUpdated
- 11.x core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php \Drupal\comment\Plugin\views\field\StatisticsLastUpdated
- 11.x core/modules/comment/src/Plugin/views/filter/StatisticsLastUpdated.php \Drupal\comment\Plugin\views\filter\StatisticsLastUpdated
Sort handler for the newer of last comment / entity updated.
Plugin annotation
@ViewsSort("comment_ces_last_updated");
Hierarchy
- class \Drupal\Component\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
- class \Drupal\views\Plugin\views\PluginBase extends \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\views\Plugin\views\ViewsPluginInterface, \Drupal\Component\Plugin\DependentPluginInterface, \Drupal\Core\Security\TrustedCallbackInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\views\Plugin\views\HandlerBase extends \Drupal\views\Plugin\views\ViewsHandlerInterface implements \Drupal\views\Plugin\views\PluginBase
- class \Drupal\views\Plugin\views\sort\SortPluginBase extends \Drupal\Core\Cache\CacheableDependencyInterface implements \Drupal\views\Plugin\views\HandlerBase
- class \Drupal\views\Plugin\views\sort\Date implements \Drupal\views\Plugin\views\sort\SortPluginBase
- class \Drupal\comment\Plugin\views\sort\StatisticsLastUpdated implements \Drupal\views\Plugin\views\sort\Date
- class \Drupal\views\Plugin\views\sort\Date implements \Drupal\views\Plugin\views\sort\SortPluginBase
- class \Drupal\views\Plugin\views\sort\SortPluginBase extends \Drupal\Core\Cache\CacheableDependencyInterface implements \Drupal\views\Plugin\views\HandlerBase
- class \Drupal\views\Plugin\views\HandlerBase extends \Drupal\views\Plugin\views\ViewsHandlerInterface implements \Drupal\views\Plugin\views\PluginBase
- class \Drupal\views\Plugin\views\PluginBase extends \Drupal\Core\Plugin\ContainerFactoryPluginInterface, \Drupal\views\Plugin\views\ViewsPluginInterface, \Drupal\Component\Plugin\DependentPluginInterface, \Drupal\Core\Security\TrustedCallbackInterface implements \Drupal\Core\Plugin\PluginBase
- class \Drupal\Core\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait implements \Drupal\Component\Plugin\PluginBase
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 {
/**
* The node table.
*/
protected $node_table;
/**
* The field alias.
*/
protected $field_alias;
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);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.