You are here

protected function DependencyHelper::getInheritingFieldNames in Conditional Fields 4.x

Same name and namespace in other branches
  1. 8 src/DependencyHelper.php \Drupal\conditional_fields\DependencyHelper::getInheritingFieldNames()

Return a list of fields to inherit conditional settings.

2 calls to DependencyHelper::getInheritingFieldNames()
DependencyHelper::fieldHasChildren in src/DependencyHelper.php
Determine whether a field contains other fields.
DependencyHelper::getInheritingFields in src/DependencyHelper.php
Return fields with conditional settings to inherit.

File

src/DependencyHelper.php, line 215

Class

DependencyHelper
Resolve conditional field's dependencies.

Namespace

Drupal\conditional_fields

Code

protected function getInheritingFieldNames($parent_field) {
  if (!isset($this->inheriting_fields)) {
    $this->inheriting_fields = $this
      ->getInheritingChildren();
  }
  if (!isset($this->inheriting_fields[$parent_field])) {
    return [];
  }
  return $this->inheriting_fields[$parent_field];
}