public function SocialAlbumController::checkGroupAlbumAccess 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::checkGroupAlbumAccess()
- 10.1.x modules/social_features/social_album/src/Controller/SocialAlbumController.php \Drupal\social_album\Controller\SocialAlbumController::checkGroupAlbumAccess()
- 10.2.x modules/social_features/social_album/src/Controller/SocialAlbumController.php \Drupal\social_album\Controller\SocialAlbumController::checkGroupAlbumAccess()
Checks access to the group album creation page.
Parameters
\Drupal\group\Entity\GroupInterface $group: The group object.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
1 string reference to 'SocialAlbumController::checkGroupAlbumAccess'
- social_album.routing.yml in modules/
social_features/ social_album/ social_album.routing.yml - modules/social_features/social_album/social_album.routing.yml
File
- modules/
social_features/ social_album/ src/ Controller/ SocialAlbumController.php, line 336
Class
- SocialAlbumController
- Returns responses for Album routes.
Namespace
Drupal\social_album\ControllerCode
public function checkGroupAlbumAccess(GroupInterface $group) {
$access = $this
->checkGroupAccess($group);
if ($access
->isAllowed()) {
return $group
->getGroupType()
->getContentPlugin('group_node:album')
->createEntityAccess($group, $this
->currentUser())
->andIf($this
->checkUserAlbumsAccess());
}
return $access;
}