You are here

public function EntityProcessorBase::buildAdvancedForm in Feeds 8.3

File

src/Feeds/Processor/EntityProcessorBase.php, line 886

Class

EntityProcessorBase
Defines a base entity processor.

Namespace

Drupal\feeds\Feeds\Processor

Code

public function buildAdvancedForm(array $form, FormStateInterface $form_state) {
  if ($bundle_key = $this->entityType
    ->getKey('bundle')) {
    $form['values'][$bundle_key] = [
      '#type' => 'select',
      '#options' => $this
        ->bundleOptions(),
      '#title' => $this
        ->bundleLabel(),
      '#required' => TRUE,
      '#default_value' => $this
        ->bundle() ?: key($this
        ->bundleOptions()),
      '#disabled' => $this
        ->isLocked(),
    ];
  }
  return $form;
}