public function BlocksRendererHelper::getBlockAccess in Gutenberg 8.2
Check the access of the block.
Parameters
\Drupal\Core\Block\BlockPluginInterface $plugin_block: Block Plugin instance.
bool $return_as_object: Whether to return as an object or not.
Return value
bool|\Drupal\Core\Access\AccessResultInterface The access result.
File
- src/
BlocksRendererHelper.php, line 207
Class
- BlocksRendererHelper
- Class BlocksRendererHelper.
Namespace
Drupal\gutenbergCode
public function getBlockAccess(BlockPluginInterface $plugin_block, $return_as_object = TRUE) {
return $plugin_block
->access($this->currentUser, $return_as_object);
}