You are here

public function CertificateMappingsInlineEntityForm::entityForm in Certificate 4.x

File

src/Form/CertificateMappingsInlineEntityForm.php, line 14

Class

CertificateMappingsInlineEntityForm
Class CertificateConfigForm.

Namespace

Drupal\certificate\Form

Code

public function entityForm(array $entity_form, FormStateInterface $form_state) {
  $entity_form = parent::entityForm($entity_form, $form_state);
  $settings = Drupal::config('certificate.settings');

  /*
   $mappers = certificate_get_certificate_mappers();

   $credits = array_column($course_credit, $label, $type);
   $form_display = $this->getFormDisplay($entity_form['#entity'], $entity_form['#form_mode']);

   // Load parent and add dynamic options
   foreach ($mappers as $key => $map) {
   $entity_form[$key]['fieldset'] = [
   '#type' => 'details',
   '#title' => $map,
   ];
   $form_display->buildForm($entity_form['#entity'], $entity_form[$key]['fieldset'], $form_state);
   $entity_form[$key]['fieldset']['entity_id']['widget'][0]['target_id']['#default_value'] = $course;
   }
  */
  return $entity_form;
}