You are here

function skype_page_bottom in Skype 8

Implements hook_page_bottom().

File

./skype.module, line 58

Code

function skype_page_bottom(array &$page_bottom) {

  /** @var \Drupal\skype\Manager\SkypeManager $manager */
  $manager = Drupal::service('skype.manager');
  if ($manager
    ->loadSkypeChatCanvas()) {
    $page_bottom['skype'] = [
      '#theme' => 'skype_chat_canvas',
      '#message_recipient' => $manager
        ->getMessageRecipient(),
      '#chat_id' => $manager
        ->getChatId(),
      '#attributes' => $manager
        ->getAttributes(),
    ];
  }
}