protected function CountryItem::getAvailableBundleInfo in Country 8
Get all available bundles which used country entity field.
1 call to CountryItem::getAvailableBundleInfo()
- CountryItem::buildOptionsForm in src/
Plugin/ views/ filter/ CountryItem.php - Provide the basic form which calls through to subforms. If overridden, it is best to call through to the parent, or to at least make sure all of the functions in this form are called.
File
- src/
Plugin/ views/ filter/ CountryItem.php, line 249
Class
- CountryItem
- Filter by country ISO2.
Namespace
Drupal\country\Plugin\views\filterCode
protected function getAvailableBundleInfo() {
$bundles = $this
->getFieldStorageDefinition()
->getBundles();
$options = [
'global' => $this
->t('Global'),
];
if ($bundles) {
$entityBundles = $this->entityTypeBundleInfo
->getBundleInfo($this->definition['entity_type']);
foreach ($bundles as $bundle_id) {
$options[$bundle_id] = $entityBundles[$bundle_id]['label'];
}
}
return $options;
}