function opigno_module_preprocess_html in Opigno module 8
Same name and namespace in other branches
- 3.x opigno_module.module \opigno_module_preprocess_html()
Implements hook_preprocess_page().
File
- ./
opigno_module.module, line 228 - Contains opigno_module.module.
Code
function opigno_module_preprocess_html(&$variables) {
// Remove admin bar for item form (included in iframe)
$route_name = \Drupal::routeMatch()
->getRouteName();
if ($route_name == 'opigno_module.manager.get_item_form' || $route_name == 'opigno_module.add_external_package' || $route_name == 'opigno_module.add_external_package_ppt') {
unset($variables['page_top']);
}
if ($route_name == 'opigno_module.group.answer_form') {
$variables['attributes']['class'][] = 'section-module';
if (!empty(\Drupal::request()->cookies
->get('fullscreen'))) {
$variables['attributes']['class'][] = 'fullscreen';
}
}
}