protected function DependencyHelper::getBundleFormFields in Conditional Fields 4.x
Same name and namespace in other branches
- 8 src/DependencyHelper.php \Drupal\conditional_fields\DependencyHelper::getBundleFormFields()
Return all fields attached to a bundle.
2 calls to DependencyHelper::getBundleFormFields()
- DependencyHelper::getBundleFormField in src/
DependencyHelper.php - Return a field attached to a bundle.
- DependencyHelper::registerBundleDependentFields in src/
DependencyHelper.php - Register all dependent fields attached to a bundle.
File
- src/
DependencyHelper.php, line 317
Class
- DependencyHelper
- Resolve conditional field's dependencies.
Namespace
Drupal\conditional_fieldsCode
protected function getBundleFormFields() {
/** @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface $entity */
$entity = \Drupal::entityTypeManager()
->getStorage('entity_form_display')
->load($this->entity_type . '.' . $this->bundle . '.default');
if (!$entity) {
return [];
}
return $entity
->getComponents();
}