You are here

function opigno_calendar_theme_suggestions_alter in Opigno calendar 8

Same name and namespace in other branches
  1. 3.x opigno_calendar.module \opigno_calendar_theme_suggestions_alter()

Implements hook_theme_suggestions_alter().

File

./opigno_calendar.module, line 141
Contains opigno_calendar.module.

Code

function opigno_calendar_theme_suggestions_alter(array &$suggestions, array $variables, $hook) {
  if (isset($variables['elements']['content']['#view_id'])) {
    if (\Drupal::routeMatch()
      ->getRouteName() == 'view.opigno_calendar.page_month' && $variables['elements']['content']['#view_id'] == 'opigno_calendar' && $hook == 'block') {
      $suggestions[] = 'block__opigno_calendar';
    }
  }
}