You are here

function footer_message_preprocess_page in Footer Message 8

Same name and namespace in other branches
  1. 7 footer_message.module \footer_message_preprocess_page()

Implements hook_preprocess_HOOK().

File

./footer_message.module, line 73
This module provides a configurable footer message as a block.

Code

function footer_message_preprocess_page(&$variables) {

  // Provide footer_message as a theme variable to hook_preprocess_page()
  // and page.html.twig.
  // Note that we apply filter format before outputting HTML.
  $config = \Drupal::config('footer_message.settings');
  $message = $config
    ->get('footer_message_msg');
  $format = $config
    ->get('footer_message_format');
  $variables['footer_message'] = check_markup($message ? $message : '', $format);
}