protected function SocialAlbumController::checkGroupAccess in Open Social 10.0.x
Same name and namespace in other branches
- 10.3.x modules/social_features/social_album/src/Controller/SocialAlbumController.php \Drupal\social_album\Controller\SocialAlbumController::checkGroupAccess()
- 10.1.x modules/social_features/social_album/src/Controller/SocialAlbumController.php \Drupal\social_album\Controller\SocialAlbumController::checkGroupAccess()
- 10.2.x modules/social_features/social_album/src/Controller/SocialAlbumController.php \Drupal\social_album\Controller\SocialAlbumController::checkGroupAccess()
Checks access to create an album in a group.
Parameters
\Drupal\group\Entity\GroupInterface $group: The group object.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
2 calls to SocialAlbumController::checkGroupAccess()
- SocialAlbumController::checkGroupAlbumAccess in modules/
social_features/ social_album/ src/ Controller/ SocialAlbumController.php - Checks access to the group album creation page.
- SocialAlbumController::checkGroupAlbumsAccess in modules/
social_features/ social_album/ src/ Controller/ SocialAlbumController.php - Checks access to the group albums page.
File
- modules/
social_features/ social_album/ src/ Controller/ SocialAlbumController.php, line 308
Class
- SocialAlbumController
- Returns responses for Album routes.
Namespace
Drupal\social_album\ControllerCode
protected function checkGroupAccess(GroupInterface $group) {
$is_allow = $group
->getGroupType()
->hasContentPlugin('group_node:album');
return AccessResult::allowedIf($is_allow);
}