You are here

function social_album_preprocess_block__social_post in Open Social 10.1.x

Same name and namespace in other branches
  1. 10.3.x modules/social_features/social_album/social_album.module \social_album_preprocess_block__social_post()
  2. 10.0.x modules/social_features/social_album/social_album.module \social_album_preprocess_block__social_post()
  3. 10.2.x modules/social_features/social_album/social_album.module \social_album_preprocess_block__social_post()

Implements hook_preprocess_HOOK().

File

modules/social_features/social_album/social_album.module, line 88
The Social Album module.

Code

function social_album_preprocess_block__social_post(&$variables) {
  if (\Drupal::routeMatch()
    ->getRouteName() === 'social_album.post' && ($content = \Drupal::service('social_post.helper')
    ->buildCurrentUserImage())) {
    $variables['content'] = [
      'form' => $variables['content'],
      'current_user_image' => $content,
    ];
  }
}