Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HandlerBase.php

function HandlerBase::access

Overrides ViewsHandlerInterface::access

2 calls to HandlerBase::access()
LanguageFilter::access in core/modules/views/src/Plugin/views/filter/LanguageFilter.php
Check whether given user has access to this handler.
LanguageFilter::access in core/modules/views/src/Plugin/views/filter/LanguageFilter.php
Check whether given user has access to this handler.
2 methods override HandlerBase::access()
EntityField::access in core/modules/views/src/Plugin/views/field/EntityField.php
Check whether given user has access to this handler.
LanguageFilter::access in core/modules/views/src/Plugin/views/filter/LanguageFilter.php
Check whether given user has access to this handler.

File

core/modules/views/src/Plugin/views/HandlerBase.php, line 555

Class

HandlerBase
Base class for Views handler plugins.

Namespace

Drupal\views\Plugin\views

Code

public function access(AccountInterface $account) {
    if (isset($this->definition['access callback']) && function_exists($this->definition['access callback'])) {
        if (isset($this->definition['access arguments']) && is_array($this->definition['access arguments'])) {
            return call_user_func_array($this->definition['access callback'], [
                $account,
            ] + $this->definition['access arguments']);
        }
        return $this->definition['access callback']($account);
    }
    return TRUE;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal