kartik\export\ExportMenu::generateBeforeContent PHP Method

generateBeforeContent() public method

Generates the before content at the top of the exported sheet
public generateBeforeContent ( ) : void
return void
    public function generateBeforeContent()
    {
        $colFirst = self::columnName(1);
        $sheet = $this->_objPHPExcelSheet;
        foreach ($this->contentBefore as $contentBefore) {
            $sheet->setCellValue($colFirst . $this->_beginRow, $contentBefore['value'], true);
            $sheet->getStyle($colFirst . $this->_beginRow)->applyFromArray(ArrayHelper::merge($this->_defaultStyleOptions, isset($contentBefore['styleOptions']) ? ArrayHelper::getValue($contentBefore['styleOptions'], $this->_exportType, []) : []));
            $this->_beginRow += 1;
        }
    }