dataRows = $configuration['data_rows']; $this->ids = $configuration['ids']; } /** * {@inheritdoc} */ public function fields() { if ($this->count() > 0) { $first_row = reset($this->dataRows); $field_names = array_keys($first_row); return array_combine($field_names, $field_names); } else { return []; } } /** * {@inheritdoc} */ public function initializeIterator() { return new \ArrayIterator($this->dataRows); } /** * {@inheritdoc} */ public function __toString() { return 'Embedded data'; } /** * {@inheritdoc} */ public function getIds() { return $this->ids; } /** * {@inheritdoc} */ public function count() { return count($this->dataRows); } }