You are here

public function FeaturesAssigner::getBundleOptions in Features 8.4

Same name and namespace in other branches
  1. 8.3 src/FeaturesAssigner.php \Drupal\features\FeaturesAssigner::getBundleOptions()

Returns an array of bundle names suitable for a select option list.

Return value

array An array of bundles, keyed by machine_name, with values being human readable names.

Overrides FeaturesAssignerInterface::getBundleOptions

File

src/FeaturesAssigner.php, line 385

Class

FeaturesAssigner
Class responsible for performing package assignment.

Namespace

Drupal\features

Code

public function getBundleOptions() {
  $list = $this
    ->getBundleList();
  $result = [];
  foreach ($list as $machine_name => $bundle) {
    $result[$machine_name] = $bundle
      ->getName();
  }
  return $result;
}