You are here

public function WidgetManager::getWidgetsOptionSet in Fivestar 8

Returns an array of field options based on available widgets.

Return value

array Associative array where the key is the option value and the value is the option label.

File

src/WidgetManager.php, line 108

Class

WidgetManager
Contains methods for managing votes.

Namespace

Drupal\fivestar

Code

public function getWidgetsOptionSet() {
  $options = [];
  foreach ($this
    ->getWidgets() as $widget_key => $widget_info) {
    $options[$widget_key] = $widget_info['label'];
  }
  return $options;
}