Process add columns.

@param mixed $data
@param mixed $row
@return array
498610
protected function addColumns($data, $row)
    {
        foreach ($this->appendColumns as $key => $value) {
            $value['content'] = Helper::compileContent($value['content'], $data, $row);
            $data             = Helper::includeInArray($value, $data);
        }

        return $data;
    }
1086509
private function fillCells($row)
    {
        $newRow = [];
        foreach ($row as $column => $cell) {
            $newRow[] = $cell;
            if ($cell instanceof TableCell && $cell->getColspan() > 1) {
                foreach (range($column + 1, $column + $cell->getColspan() - 1) as $position) {
                    // insert empty value at column position
                    $newRow[] = '';
                }
            }
        }

        return $newRow ?: $row;
    }
982263
public function addColumn($data)
    {
        if ($data instanceof Column) {
            $column = $data;
            $this->indexColumns[] = $column->getName();
            if ($column->getSize()) {
                $this->indexColumnSizes[$column->getName()] = $column->getSize();
            }
        } else {
            $attrib = $data;
            $name = $attrib["name"];
            $this->indexColumns[] = $name;
            if (isset($attrib["size"])) {
                $this->indexColumnSizes[$name] = $attrib["size"];
            }
        }
    }
63474
public function getRowAttributes(Row $row, $columns, $resultColumns)
    {
        $attributes = [];

        foreach ($resultColumns as $key => $column)
        {
            $attributes[$columns[$key]] = $row[$column];
        }

        return $attributes;
    }
1297697
protected function buildRows(array $data)
    {
        $this->rows = collect($data)->map(function ($model, $number) {
            return new Row($number, $model);
        });

        if ($this->rowsCallback) {
            $this->rows->map($this->rowsCallback);
        }
    }
544888
protected function processInsert($row, $context)
    {
        if ($row instanceof InsertFromSelect) {
            return $this->processInsertFromSelect($row, $context);
        }

        $newRow = [];
        foreach ($row as $column => $value) {
            $column = $this->processColumnName($column, $context);
            $newRow[$column] = $this->processValueOrSubQuery($value, $context);
        }

        return $newRow;
    }
350866
public function addRow(array $row, Style $style)
    {
        $columnCount = count($row);
        $this->updateMaxColumnCount($columnCount);
        $cellXml = $this->getCellXml($row, $style);

        return $this->getRowXml($columnCount, $cellXml);
    }
304279
protected function _addRow(PHPExcel $phpexcel, array $row, $rowIndex) {
        $col = 0;
        foreach ($row as $key => $value) {
            $colIndex = $col++;
            if (is_array($value)) {
                $rowset = $value;
                $value = array();
                foreach ($rowset as $row) {
                    if (is_array($row)) {
                        $values = array_values($row);
                        $values = implode(' : ', $values);
                    } else {
                        $values = $row;
                    }
                    $value[] = $values;
                }
                $value = implode("\n", $value);
            }
            $phpexcel->getActiveSheet()->setCellValueByColumnAndRow($colIndex, $rowIndex, $value);
        }
    }
253939
public function process(array $row)
    {
        foreach ($this->processors as $processor) {
            $row = call_user_func($processor, $row);
        }

        return $row;
    }
1273011
public function rowsFromRaw($data)
	{
		$rows = new Rows;

		if ($data && count($data) > 0)
		{
			foreach ($data as $row)
			{
				$rows->push(self::newFromResults($row));
			}
		}

		return $rows;
	}
933848
public function addRow($row)
    {
        if ($row instanceof TableSeparator) {
            $this->rowsCopy[] = $row;

            return parent::addRow($row);
        }

        if (!is_array($row)) {
            throw new \InvalidArgumentException('A row must be an array or a TableSeparator instance.');
        }

        $this->rowsCopy[] = array_values($row);

        return parent::addRow($row);
    }
332599
function addData($data, $col_id = 0, $row_id = 0) {
        foreach ($data as $row) {
            if ($row === self::CONSOLE_TABLE_HORIZONTAL_RULE) {
                $this->_data[$row_id] = self::CONSOLE_TABLE_HORIZONTAL_RULE;
                $row_id++;
                continue;
            }
            $starting_col = $col_id;
            foreach ($row as $cell) {
                $this->_data[$row_id][$starting_col++] = $cell;
            }
            $this->_updateRowsCols();
            $this->_max_cols = max($this->_max_cols, $starting_col);
            $row_id++;
        }
    }
1221299
private function translateRow(&$row)
    {
        $new_row = [];

        // Translate incoming data via mapping array.
        foreach ($row as $key => $value) {
            if (array_has($this->config['mapping'], $key)) {
                $new_row[array_get($this->config['mapping'], $key)] = $value;
            }
        }

        // Replace with translated row.
        $row = $new_row;
    }
873505
protected function _prepareArrayRow(\Magento\Framework\DataObject $row)
    {
        $options = [];

        $options['option_' . $this->_getAttributeRenderer()->calcOptionHash(
            $row->getData('attribute')
        )]
            = 'selected="selected"';
        $options['option_' . $this->_getConditionsRenderer()->calcOptionHash(
            $row->getData('conditions')
        )]
            = 'selected="selected"';
        $options['option_' . $this->_getValueRenderer()->calcOptionHash(
            $row->getData('cvalue')
        )]
            = 'selected="selected"';

        $row->setData('option_extra_attrs', $options);
    }
412731
protected function processImportRow($rowData, $matches)
    {
        $newRow = [];

        foreach ($matches as $columnIndex => $dbNames) {
            $value = array_get($rowData, $columnIndex);
            foreach ((array) $dbNames as $dbName) {
                $newRow[$dbName] = $value;
            }
        }

        return $newRow;
    }
165871
public function format($row)
    {
        $data = $this->getArray($row);
        $data = $this->process($data);

        return json_encode($data, $this->encodeOptions);
    }
1130131
public function createFromArray(array $row)
    {
        $entities = $this->unitOfWork->getEntityRegistry()->getEntityBuilder()->castToEntity([$row], $this->className);

        return array_shift($entities);
    }