protected function PostBlock::blockAccess in Open Social 8.8
Same name and namespace in other branches
- 8.9 modules/social_features/social_post/src/Plugin/Block/PostBlock.php \Drupal\social_post\Plugin\Block\PostBlock::blockAccess()
- 8 modules/social_features/social_post/src/Plugin/Block/PostBlock.php \Drupal\social_post\Plugin\Block\PostBlock::blockAccess()
- 8.2 modules/social_features/social_post/src/Plugin/Block/PostBlock.php \Drupal\social_post\Plugin\Block\PostBlock::blockAccess()
- 8.3 modules/social_features/social_post/src/Plugin/Block/PostBlock.php \Drupal\social_post\Plugin\Block\PostBlock::blockAccess()
- 8.4 modules/social_features/social_post/src/Plugin/Block/PostBlock.php \Drupal\social_post\Plugin\Block\PostBlock::blockAccess()
- 8.5 modules/social_features/social_post/src/Plugin/Block/PostBlock.php \Drupal\social_post\Plugin\Block\PostBlock::blockAccess()
- 8.6 modules/social_features/social_post/src/Plugin/Block/PostBlock.php \Drupal\social_post\Plugin\Block\PostBlock::blockAccess()
- 8.7 modules/social_features/social_post/src/Plugin/Block/PostBlock.php \Drupal\social_post\Plugin\Block\PostBlock::blockAccess()
- 10.3.x modules/social_features/social_post/src/Plugin/Block/PostBlock.php \Drupal\social_post\Plugin\Block\PostBlock::blockAccess()
- 10.0.x modules/social_features/social_post/src/Plugin/Block/PostBlock.php \Drupal\social_post\Plugin\Block\PostBlock::blockAccess()
- 10.1.x modules/social_features/social_post/src/Plugin/Block/PostBlock.php \Drupal\social_post\Plugin\Block\PostBlock::blockAccess()
- 10.2.x modules/social_features/social_post/src/Plugin/Block/PostBlock.php \Drupal\social_post\Plugin\Block\PostBlock::blockAccess()
Indicates whether the block should be shown.
Blocks with specific access checking should override this method rather than access(), in order to avoid repeating the handling of the $return_as_object argument.
Parameters
\Drupal\Core\Session\AccountInterface $account: The user session for which to check access.
Return value
\Drupal\Core\Access\AccessResult The access result.
Overrides BlockPluginTrait::blockAccess
See also
1 method overrides PostBlock::blockAccess()
- PostGroupBlock::blockAccess in modules/
social_features/ social_post/ src/ Plugin/ Block/ PostGroupBlock.php - Indicates whether the block should be shown.
File
- modules/
social_features/ social_post/ src/ Plugin/ Block/ PostBlock.php, line 138
Class
- PostBlock
- Provides a 'PostBlock' block.
Namespace
Drupal\social_post\Plugin\BlockCode
protected function blockAccess(AccountInterface $account) {
return $this->entityTypeManager
->getAccessControlHandler($this->entityType)
->createAccess($this->bundle, $account, [], TRUE);
}