You are here

protected function ConditionalFieldForm::getFieldsList in Conditional Fields 8

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

Build options list of available fields.

1 call to ConditionalFieldForm::getFieldsList()
ConditionalFieldForm::buildTable in src/Form/ConditionalFieldForm.php
Builds table with conditional fields.

File

src/Form/ConditionalFieldForm.php, line 417

Class

ConditionalFieldForm
Class ConditionalFieldForm.

Namespace

Drupal\conditional_fields\Form

Code

protected function getFieldsList() {
  $dependency_helper = new DependencyHelper($this->entity_type, $this->bundle_name);
  $fields = [];
  foreach ($dependency_helper
    ->getAvailableConditionalFields() as $name => $label) {
    $fields[$name] = $label . ' (' . $name . ')';
  }
  return $fields;
}