NodeCounterTimestamp.php

Same filename and directory in other branches
  1. 8.9.x core/modules/statistics/src/Plugin/views/field/NodeCounterTimestamp.php
  2. 10 core/modules/statistics/src/Plugin/views/field/NodeCounterTimestamp.php
  3. 11.x core/modules/statistics/src/Plugin/views/field/NodeCounterTimestamp.php

Namespace

Drupal\statistics\Plugin\views\field

File

core/modules/statistics/src/Plugin/views/field/NodeCounterTimestamp.php

View 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

Title Deprecated Summary
NodeCounterTimestamp Field handler to display the most recent time the node has been viewed.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.