public FieldStorageConfig::getBundles()
Returns the list of bundles where the field storage has fields.
Return value
array An array of bundle names.
Overrides FieldStorageConfigInterface::getBundles
File
- core/modules/field/src/Entity/FieldStorageConfig.php, line 495
Class
- FieldStorageConfig
- Defines the Field storage configuration entity.
Namespace
Drupal\field\Entity
Code
public function getBundles() {
if (!$this->isDeleted()) {
$map = \Drupal::entityManager()->getFieldMap();
if (isset($map[$this->getTargetEntityTypeId()][$this->getName()]['bundles'])) {
return $map[$this->getTargetEntityTypeId()][$this->getName()]['bundles'];
}
}
return array();
}
Please login to continue.