Renders table row.

Example: <code>| 9971-5-0210-0 | A Tale of Two Cities  | Charles Dickens  |</code>

@param array $row
@param string $cellFormat
501576
private function renderRow(array $row, $cellFormat) {
        if (empty($row)) {
            return;
        }

        $rowContent = $this->renderColumnSeparator();
        foreach ($this->getRowColumns($row) as $column) {
            $rowContent .= $this->renderCell($row, $column, $cellFormat);
            $rowContent .= $this->renderColumnSeparator();
        }
        $this->output->writeln($rowContent);
    }
1228935
private void writeCell(Row row, int col, Object value, CellStyle style) {
		Cell cell = row.createCell(col);
		cell.setCellValue(value != null ? value.toString() : "");
		cell.setCellStyle(style);
	}
114878
protected void formatCell (HTMLTable.CellFormatter formatter, int row, int col, int limit)
    {
        formatter.setHorizontalAlignment(row, col, _cellHorizAlign);
        formatter.setVerticalAlignment(row, col, _cellVertAlign);
        formatter.setStyleName(row, col, "Cell");
        if (row == (limit-1)/_cols) {
            formatter.addStyleName(row, col, "BottomCell");
        } else if (row == 0) {
            formatter.addStyleName(row, col, "TopCell");
        } else {
            formatter.addStyleName(row, col, "MiddleCell");
        }
    }
992449
protected function _renderRow($row = null)
    {
        static $csv = '';

        if ($this->_resetStaticVariables) {
            $csv = '';
            $this->_resetStaticVariables = false;

            return null;
        }

        $csv .= (string)$this->_generateRow($row);

        return $csv;
    }
352727
public function write_blank($row, $col, $format = null) {
        if (is_array($format)) {
            $format = new MoodleODSFormat($format);
        }
        $this->write_string($row, $col, '', $format);
    }
629135
protected function renderDataCellContent($row, $data)
	{
		$content = $this->emptyText;
		if ($this->imagePathExpression && $imagePath = $this->evaluateExpression(
			$this->imagePathExpression,
			array('row' => $row, 'data' => $data)
		)
		) {
			$this->imageOptions['src'] = $imagePath;
			$content = CHtml::tag('img', $this->imageOptions);
		} elseif ($this->usePlaceHoldIt && !empty($this->placeHoldItSize)) {
			$content = CHtml::tag(
				'img',
				array('src' => 'http://placehold.it/' . $this->placeHoldItSize)
			);
		} elseif ($this->usePlaceKitten && !empty($this->placeKittenSize)) {
			$content = CHtml::tag('img', array('src' => 'http://placekitten.com/' . $this->placeKittenSize));
		}
		echo $content;
	}
878917
public function format($row)
    {
        $data = $this->getArray($row);
        $prefix = $this->getHeaderPrefix($data);
        $data = $this->process($data);

        foreach ($data as &$element) {
            if (is_null($element)) {
                $element = $this->csvFormat->getNullValue();
            } else {
                $element = $this->csvFormat->getQuote() . $this->escape($element) . $this->csvFormat->getQuote();
            }
        }

        return $prefix . $this->encode(implode($this->csvFormat->getDelimiter(), $data));
    }
165871
public function format($row)
    {
        $data = $this->getArray($row);
        $data = $this->process($data);

        return json_encode($data, $this->encodeOptions);
    }
805517
public static void renderRow(XWPFTable table, int row, RowRenderData rowData) {
        if (null == rowData || rowData.size() <= 0) return;
        XWPFTableRow tableRow = table.getRow(row);
        ObjectUtils.requireNonNull(tableRow, "Row " + row + " do not exist in the table");

        TableStyle style = rowData.getStyle();
        List<TextRenderData> cellList = rowData.getRowData();
        XWPFTableCell cell = null;

        for (int i = 0; i < cellList.size(); i++) {
            cell = tableRow.getCell(i);
            if (null == cell) {
                logger.warn("Extra cell data at row {}, but no extra cell: col {}", row, cell);
                break;
            }

            // 处理单元格样式
            if (null != style && null != style.getBackgroundColor()) {
                cell.setColor(style.getBackgroundColor());
            }

            TextRenderData cellData = cellList.get(i);
            String cellText = cellData.getText();
            if (StringUtils.isBlank(cellText)) continue;

            String[] fragment = cellText.split(TextRenderPolicy.REGEX_LINE_CHARACTOR);
            if (null == fragment) continue;

            // 处理单元格数据
            XWPFParagraph par;
            XWPFRun run;
            for (int j = 0; j < fragment.length; j++) {
                if (0 == j) {
                    CTTc ctTc = cell.getCTTc();
                    CTP ctP = (ctTc.sizeOfPArray() == 0) ? ctTc.addNewP() : ctTc.getPArray(0);
                    par = new XWPFParagraph(ctP, cell);
                } else {
                    par = cell.addParagraph();
                }
                StyleUtils.styleTableParagraph(par, style);
                run = par.createRun();
                StyleUtils.styleRun(run, cellData.getStyle());
                run.setText(fragment[j]);
            }
        }
    }
655755
public static function createFromRow(array $row, $dateTimeFormat)
    {
        $result = new static();
        $result->id = empty($row['lcirID']) ? null : (int) $row['lcirID'];
        $result->ipRange = IPFactory::rangeFromBoundaries($row['lcirIpFrom'], $row['lcirIpTo']);
        $result->type = (int) $row['lcirType'];
        $result->expires = empty($row['lcirExpires']) ? null : DateTime::createFromFormat($dateTimeFormat, $row['lcirExpires']);

        return $result;
    }
1088316
public function format_row($row) {
        if ($this->rownum < 0) {
            $this->rownum = $this->currpage * $this->pagesize;
        } else {
            $this->rownum += 1;
        }

        return parent::format_row($row);
    }
158758
public function addRow(array $row, Style $style = null)
    {
        if (!empty($row)) {
            $style = $style instanceof Style ? $style : $this->styler->getDefaultStyle();
            $this->styler->addStyle($style);
            $this->sheetFile->fwrite($this->sheet->addRow($row, $style));
        }
    }
1207495
protected function renderDataCellContent($row, $data)
    {
        $checked = CHtml::value($data, $this->name);
        $toggleOptions = $this->toggleOptions;
        $toggleOptions['icon'] = $checked === null
            ? $this->emptyIcon
            : ($checked
                ? $this->checkedIcon
                : $this->uncheckedIcon);

        $toggleOptions['url'] = isset($toggleOptions['url'])
            ? $this->evaluateExpression($toggleOptions['url'], array('data' => $data, 'row' => $row))
            : '#';

        if (!$this->displayText) {
            $htmlOptions = TbArray::getValue('htmlOptions', $this->toggleOptions, array());
            $htmlOptions['title'] = $this->getButtonLabel($checked);
            $htmlOptions['rel'] = 'tooltip';
            echo CHtml::link(TbHtml::icon($toggleOptions['icon']), $toggleOptions['url'], $htmlOptions);
        } else {
            echo TbHtml::button($this->getButtonLabel($checked), $toggleOptions);
        }
    }
1321053
protected function _formatRow(array $row) {
        $out = '';
        foreach ($row as $key => $value) {
            if (is_array($value)) {
                // This is the case with hasMany and hasAndBelongsToMany related
                // rowsets.
                $value = $this->_formatRelatedRowset($value);
            }
            $out .= "$key: $value\n";
        }
        return $out;
    }
728517
public function write_number($row, $col, $num, $format = null) {
        $this->worksheet->getStyleByColumnAndRow($col, $row+1)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_GENERAL);
        $this->worksheet->setCellValueExplicitByColumnAndRow($col, $row+1, $num, PHPExcel_Cell_DataType::TYPE_NUMERIC);
        $this->apply_format($row, $col, $format);
    }
655100
public function display($row)
    {
        if (!$this->visible) {
            return;
        }

        $this->setupRenderers($row);
        $this->displayRenderers($row);
    }
939978
public function buildRows(
        array $rows,
        $style = null
    ): void {
        // The row needs to start at 1 at the beginning of execution.
        // The top left corner of the sheet is actually position (col = 1, row = 1).
        $rowIndex = 1;

        // If we have a header row then we need to bump the row index down one,
        // otherwise we'll overwrite the header (not ideal).
        if ($this->builder->getActiveSheet()->cellExistsByColumnAndRow(1, $rowIndex)) {
            $rowIndex = 2;
        }

        foreach ($rows as $row) {
            $this->buildRow($row, $style, $rowIndex);

            $rowIndex++;
        }

        return;
    }