You are here

FileDownloadNumeric.php in File Download 8

File

modules/file_download_counter/src/Plugin/views/field/FileDownloadNumeric.php
View source
<?php

namespace Drupal\file_download_counter\Plugin\views\field;

use Drupal\views\Plugin\views\field\NumericField;
use Drupal\Core\Session\AccountInterface;

/**
 * Field handler to display numeric values from the statistics module.
 *
 * @ingroup views_field_handlers
 *
 * @ViewsField("file_download_counter_numeric")
 */
class FileDownloadNumeric extends NumericField {

  /**
   * {@inheritdoc}
   */
  public function access(AccountInterface $account) {
    return $account
      ->hasPermission('view file download counter');
  }

}

Classes

Namesort descending Description
FileDownloadNumeric Field handler to display numeric values from the statistics module.