You are here

public function ViewsAccessCallback::access in Views Access Callback 8

Determine if the current user has access or not.

Parameters

\Drupal\Core\Session\AccountInterface $account: The user who wants to access this view.

Return value

bool Returns whether the user has access to the view.

Overrides AccessPluginBase::access

File

src/Plugin/views/access/ViewsAccessCallback.php, line 70

Class

ViewsAccessCallback
Access plugin that provides permission-based access control.

Namespace

Drupal\views_access_callback\Plugin\views\access

Code

public function access(AccountInterface $account) {
  return views_access_callback_access_callback($this->view->storage
    ->id(), $this->view->current_display, $this->options['views_access_callback']);
}