You are here

function photos_access_photos_access in Album Photos 8.4

Same name and namespace in other branches
  1. 8.5 photos_access/photos_access.module \photos_access_photos_access()
  2. 7.3 photos_access/photos_access.module \photos_access_photos_access()
  3. 6.0.x photos_access/photos_access.module \photos_access_photos_access()

Implements hook_photos_access().

File

photos_access/photos_access.module, line 764
Implementation of photos_access.module.

Code

function photos_access_photos_access() {
  $current_path = \Drupal::service('path.current')
    ->getPath();
  $path_args = explode('/', $current_path);
  if (isset($path_args[2]) && $path_args[1] == 'node' && is_numeric($path_args[2])) {
    return [
      $path_args[2],
    ];
  }
}