function DisplayPluginBase::access
Same name in other branches
- 9 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::access()
- 8.9.x core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::access()
- 10 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::access()
Overrides DisplayPluginInterface::access
1 call to DisplayPluginBase::access()
- Attachment::attachTo in core/
modules/ views/ src/ Plugin/ views/ display/ Attachment.php
File
-
core/
modules/ views/ src/ Plugin/ views/ display/ DisplayPluginBase.php, line 2329
Class
- DisplayPluginBase
- Base class for views display plugins.
Namespace
Drupal\views\Plugin\views\displayCode
public function access(?AccountInterface $account = NULL) {
if (!isset($account)) {
$account = \Drupal::currentUser();
}
$plugin = $this->getPlugin('access');
/** @var \Drupal\views\Plugin\views\access\AccessPluginBase $plugin */
if ($plugin) {
return $plugin->access($account);
}
// Fallback to all access if no plugin.
return TRUE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.