function BlockPluginTrait::access
Same name in other branches
- 9 core/lib/Drupal/Core/Block/BlockPluginTrait.php \Drupal\Core\Block\BlockPluginTrait::access()
- 8.9.x core/lib/Drupal/Core/Block/BlockPluginTrait.php \Drupal\Core\Block\BlockPluginTrait::access()
- 10 core/lib/Drupal/Core/Block/BlockPluginTrait.php \Drupal\Core\Block\BlockPluginTrait::access()
File
-
core/
lib/ Drupal/ Core/ Block/ BlockPluginTrait.php, line 126
Class
- BlockPluginTrait
- Provides the base implementation of a block plugin.
Namespace
Drupal\Core\BlockCode
public function access(AccountInterface $account, $return_as_object = FALSE) {
$access = $this->blockAccess($account);
return $return_as_object ? $access : $access->isAllowed();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.