You are here

public function UpdateUtils::bundleOptions in Scheduled Updates 8

Create select element bundle options for entity type.

Parameters

$entity_type:

Return value

array

Overrides UpdateUtilsInterface::bundleOptions

File

src/UpdateUtils.php, line 221

Class

UpdateUtils
Service to determine information about Scheduled Update Types.

Namespace

Drupal\scheduled_updates

Code

public function bundleOptions($entity_type) {
  $info = $this->bundleInfo
    ->getBundleInfo($entity_type);
  $options = [];
  foreach ($info as $bundle => $bundle_info) {
    $options[$bundle] = $bundle_info['label'];
  }
  return $options;
}