You are here

protected function DependencyHelper::getBundleFormFields in Conditional Fields 8

Same name and namespace in other branches
  1. 4.x 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 257

Class

DependencyHelper
Resolve conditional field's dependencies.

Namespace

Drupal\conditional_fields

Code

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();
}