You are here

public function WidgetManager::getWidgetLibrary in Fivestar 8

Returns the library for a given widget if it exists.

Parameters

string $widget_key: The key of the target widget.

Return value

string The library name.

File

src/WidgetManager.php, line 93

Class

WidgetManager
Contains methods for managing votes.

Namespace

Drupal\fivestar

Code

public function getWidgetLibrary($widget_key) {
  if (!($widget_info = $this
    ->getWidgetInfo($widget_key))) {
    return '';
  }
  return $widget_info['library'];
}