You are here

protected function ChannelForm::getBundleOptions in Entity Share 8

Same name and namespace in other branches
  1. 8.3 modules/entity_share_server/src/Form/ChannelForm.php \Drupal\entity_share_server\Form\ChannelForm::getBundleOptions()
  2. 8.2 modules/entity_share_server/src/Form/ChannelForm.php \Drupal\entity_share_server\Form\ChannelForm::getBundleOptions()

Helper function to get the bundle options.

Parameters

string $selected_entity_type: The entity type.

Return value

array An array of options.

1 call to ChannelForm::getBundleOptions()
ChannelForm::buildBundleSelect in modules/entity_share_server/src/Form/ChannelForm.php
Helper function to generate bundle select.

File

modules/entity_share_server/src/Form/ChannelForm.php, line 653

Class

ChannelForm
Class ChannelForm.

Namespace

Drupal\entity_share_server\Form

Code

protected function getBundleOptions($selected_entity_type) {
  $options = [];
  foreach ($this->bundleInfos[$selected_entity_type] as $bundle_id => $bundle_info) {
    $options[$bundle_id] = $bundle_info['label'];
  }
  return $options;
}