You are here

protected function StaticFieldsForm::getFieldOptions in Feed Import 8

Gets an array containing entity fields

Parameters

object $e: Entity info

Return value

array Array with groupped fields

1 call to StaticFieldsForm::getFieldOptions()
StaticFieldsForm::buildForm in src/Form/StaticFieldsForm.php
Form constructor.

File

src/Form/StaticFieldsForm.php, line 189
Contains \Drupal\feed_import\Form\StaticFieldsForm

Class

StaticFieldsForm

Namespace

Drupal\feed_import\Form

Code

protected function getFieldOptions($e) {
  $el = array();

  // Handle properties.
  if ($el = array_combine($e->properties, $e->properties)) {
    $el = array(
      '#' => $el,
    );
  }

  // Handle fields.
  foreach ($e->fields as $f => $val) {
    foreach ($val['columns'] as $col) {
      $el[$f][$col] = $f . ':' . $col;
    }
  }
  return $el;
}