NodeCounterTimestamp.php in Drupal 10
Same filename and directory in other branches
Namespace
Drupal\statistics\Plugin\views\fieldFile
core/modules/statistics/src/Plugin/views/field/NodeCounterTimestamp.phpView source
<?php
namespace Drupal\statistics\Plugin\views\field;
use Drupal\views\Plugin\views\field\Date;
use Drupal\Core\Session\AccountInterface;
/**
* Field handler to display the most recent time the node has been viewed.
*
* @ingroup views_field_handlers
*
* @ViewsField("node_counter_timestamp")
*/
class NodeCounterTimestamp extends Date {
/**
* {@inheritdoc}
*/
public function access(AccountInterface $account) {
return $account
->hasPermission('view post access counter');
}
}
Classes
Name | Description |
---|---|
NodeCounterTimestamp | Field handler to display the most recent time the node has been viewed. |