You are here

public function LivechatWidgetHandler::__construct in Rocket.Chat 8

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

WidgetHandler constructor.

Parameters

string|mixed $widgetLibraryName: Library Name.

string|mixed $widgetLibraryRoute: Library Route.

File

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

Class

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

Namespace

Drupal\livechat

Code

public function __construct($widgetLibraryName, $widgetLibraryRoute) {
  if (!empty($widgetLibraryName) && !is_null($widgetLibraryName)) {
    if (!empty($widgetLibraryRoute) && !is_null($widgetLibraryRoute)) {
      $this->widgetLibraryName = $widgetLibraryName;
      $this->widgetLibraryRoute = $widgetLibraryRoute;
      $this->form = [];
    }
  }
}