You are here

protected function DependencyHelper::registerBundleDependentFields in Conditional Fields 8

Same name and namespace in other branches
  1. 4.x src/DependencyHelper.php \Drupal\conditional_fields\DependencyHelper::registerBundleDependentFields()

Register all dependent fields attached to a bundle.

1 call to DependencyHelper::registerBundleDependentFields()
DependencyHelper::getBundleDependentFields in src/DependencyHelper.php
Return all dependent fields attached to a bundle.

File

src/DependencyHelper.php, line 235

Class

DependencyHelper
Resolve conditional field's dependencies.

Namespace

Drupal\conditional_fields

Code

protected function registerBundleDependentFields() {
  $this->dependent_fields[$this->entity_type][$this->bundle] = [];
  foreach ($this
    ->getBundleFormFields() as $name => $field) {
    if (!$this
      ->hasConditionalFields($field)) {
      continue;
    }
    $this->dependent_fields[$this->entity_type][$this->bundle][$name] = $field;
  }
}