function template_preprocess_photos_comment_count in Album Photos 6.0.x
Prepares variables for photos comment count templates.
Default template: photos-comment-count.html.twig.
Parameters
array $variables: An associative array containing:
- comcount: The number of comments.
- url: A link to the image.
File
- ./
photos.module, line 1062 - Implementation of photos.module.
Code
function template_preprocess_photos_comment_count(array &$variables) {
$variables['post_comments'] = \Drupal::currentUser()
->hasPermission('post comments');
$variables['login_href'] = Url::fromRoute('user.login')
->toString();
}