public function WidgetManager::getWidgetLabel in Fivestar 8
Returns the label for a given widget if it exists.
Parameters
string $widget_key: The key of the target widget.
Return value
string The widget label.
File
- src/
WidgetManager.php, line 76
Class
- WidgetManager
- Contains methods for managing votes.
Namespace
Drupal\fivestarCode
public function getWidgetLabel($widget_key) {
if (!($widget_info = $this
->getWidgetInfo($widget_key))) {
return '';
}
return $widget_info['label'];
}