You are here

public function WidgetManager::getWidgetInfo in Fivestar 8

Returns a widget's info.

Parameters

string $widget_key: The key of the target widget.

Return value

array An array of widget info.

See also

hook_fivestar_widgets()

2 calls to WidgetManager::getWidgetInfo()
WidgetManager::getWidgetLabel in src/WidgetManager.php
Returns the label for a given widget if it exists.
WidgetManager::getWidgetLibrary in src/WidgetManager.php
Returns the library for a given widget if it exists.

File

src/WidgetManager.php, line 62

Class

WidgetManager
Contains methods for managing votes.

Namespace

Drupal\fivestar

Code

public function getWidgetInfo($widget_key) {
  $widgets_info = $this
    ->getWidgets();
  return isset($widgets_info[$widget_key]) ? $widgets_info[$widget_key] : [];
}