You are here

private function LivechatWidgetHandler::setAssets in Rocket.Chat 8

Same name and namespace in other branches
  1. 8.2 modules/livechat/src/LivechatWidgetHandler.php \Drupal\livechat\LivechatWidgetHandler::setAssets()

Extract the intended javascript based on the route and the Library route.

1 call to LivechatWidgetHandler::setAssets()
LivechatWidgetHandler::renderWidgetWithJavaScriptKeys in modules/livechat/src/LivechatWidgetHandler.php
Render Widget.

File

modules/livechat/src/LivechatWidgetHandler.php, line 163
Contains \Drupal\rocket_chat\WidgetHandler.

Class

LivechatWidgetHandler
Glue class to make the widget dynamically build the javascript file.

Namespace

Drupal\livechat

Code

private function setAssets() {
  $this->form['#attached']['library'][] = $this
    ->getWidgetLibraryName() . '/' . $this
    ->getWidgetLibraryRoute();
}