public function DisplayPluginBase::access in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Plugin/views/display/DisplayPluginBase.php \Drupal\views\Plugin\views\display\DisplayPluginBase::access()
Determines if the user has access to this display of the view.
Overrides DisplayPluginInterface::access
1 call to DisplayPluginBase::access()
- Attachment::attachTo in core/
modules/ views/ src/ Plugin/ views/ display/ Attachment.php - Allows displays to attach to other views.
File
- core/
modules/ views/ src/ Plugin/ views/ display/ DisplayPluginBase.php, line 2233 - Contains \Drupal\views\Plugin\views\display\DisplayPluginBase.
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;
}