You are here

protected function EntityReference::getBundles in Feeds 8.3

Returns a list of bundles that may be referenced.

If there are no target bundles configured on the entity reference field, an empty array is returned.

Return value

array Bundles that are allowed to be referenced.

2 calls to EntityReference::getBundles()
EntityReference::createEntity in src/Feeds/Target/EntityReference.php
Creates a new entity with the given label and saves it.
EntityReference::findEntities in src/Feeds/Target/EntityReference.php
Tries to lookup an existing entity.
1 method overrides EntityReference::getBundles()
File::getBundles in src/Feeds/Target/File.php
The file entity doesn't support any bundles. Providing an empty array here will prevent the bundle check from being added in the find entity query.

File

src/Feeds/Target/EntityReference.php, line 219

Class

EntityReference
Defines an entity reference mapper.

Namespace

Drupal\feeds\Feeds\Target

Code

protected function getBundles() {
  if (!empty($this->settings['handler_settings']['target_bundles'])) {
    return $this->settings['handler_settings']['target_bundles'];
  }
  return [];
}