You are here

public function LivechatWidgetcontroller::createWidget in Rocket.Chat 8

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

Create widget.

Return value

array Rendered widget.

File

modules/livechat/src/Controller/LivechatWidgetcontroller.php, line 48
Contains \Drupal\rocket_chat\Controller\Rocket.

Class

LivechatWidgetcontroller
Class Rocket extends ControllerBase.

Namespace

Drupal\livechat\Controller

Code

public function createWidget() {
  $widget = new LivechatWidgetHandler('rocket_chat', 'rocket_chat_conf');
  return $widget
    ->renderWidgetWithJavaScriptKeys([
    'server',
  ]);
}