You are here

public function StatisticsNumeric::access in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/statistics/src/Plugin/views/field/StatisticsNumeric.php \Drupal\statistics\Plugin\views\field\StatisticsNumeric::access()

Check whether given user has access to this handler.

Parameters

\Drupal\Core\Session\AccountInterface $account: The user account to check.

Return value

bool TRUE if the user has access to the handler, FALSE otherwise.

Overrides HandlerBase::access

File

core/modules/statistics/src/Plugin/views/field/StatisticsNumeric.php, line 20

Class

StatisticsNumeric
Field handler to display numeric values from the statistics module.

Namespace

Drupal\statistics\Plugin\views\field

Code

public function access(AccountInterface $account) {
  return $account
    ->hasPermission('view post access counter');
}