function photos_access_node_access in Album Photos 8.4
Same name and namespace in other branches
- 8.5 photos_access/photos_access.module \photos_access_node_access()
- 6.0.x photos_access/photos_access.module \photos_access_node_access()
Implements hook_ENTITY_TYPE_access().
File
- photos_access/
photos_access.module, line 335 - Implementation of photos_access.module.
Code
function photos_access_node_access(EntityInterface $entity, $operation, AccountInterface $account) {
if (\Drupal::config('photos.settings')
->get('photos_access_' . $entity
->getType())) {
// Check if album password is required.
photos_access_request_album_password();
}
// No opinion.
return AccessResult::neutral();
}