function context_theme_suggestions_page_alter in Context 8
Same name and namespace in other branches
- 8.4 context.module \context_theme_suggestions_page_alter()
Implements hook_theme_suggestions_page_alter().
File
- ./
context.module, line 47
Code
function context_theme_suggestions_page_alter(array &$suggestions, array $variables) {
$context_manager = \Drupal::service('context.manager');
foreach ($context_manager
->getActiveReactions('page_template_suggestions') as $reaction) {
$template_suggestions = explode(PHP_EOL, $reaction
->execute());
$suggestions = array_merge($suggestions, $template_suggestions);
}
}