protected function addHeaderRowToCSV()
    {
        $fieldArray = array_combine($this->fieldArray, $this->fieldArray);
        $hooks = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][__CLASS__]['customizeCsvHeader'] ?? [];
        if (!empty($hooks)) {
            $hookParameters = [
                'fields' => &$fieldArray,
            ];
            foreach ($hooks as $hookFunction) {
                GeneralUtility::callUserFunction($hookFunction, $hookParameters, $this);
            }
        }
        // Add header row, control fields will be reduced inside addToCSV()
        $this->addToCSV($fieldArray);
    }
protected function addHeaderRowToCSV()
    {
        $fieldArray = array_combine($this->fieldArray, $this->fieldArray);
        $hooks = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][__CLASS__]['customizeCsvHeader'] ?? [];
        if (!empty($hooks)) {
            $hookParameters = [
                'fields' => &$fieldArray,
            ];
            foreach ($hooks as $hookFunction) {
                GeneralUtility::callUserFunction($hookFunction, $hookParameters, $this);
            }
        }
        // Add header row, control fields will be reduced inside addToCSV()
        $this->addToCSV($fieldArray);
    }
protected function addHeaderRowToCSV ( ) { $ fieldArray = array_combine ( $ this -> fieldArray , $ this -> fieldArray ) ; $ hooks = $ GLOBALS [ 'TYPO3_CONF_VARS' ] [ 'SC_OPTIONS' ] [ __CLASS__ ] [ 'customizeCsvHeader' ] ?? [ ] ; if ( ! empty ( $ hooks ) ) { $ hookParameters = [ 'fields' => & $ fieldArray , ] ; foreach ( $ hooks as $ hookFunction ) { GeneralUtility :: callUserFunction ( $ hookFunction , $ hookParameters , $ this ) ; } } // Add header row, control fields will be reduced inside addToCSV() $ this -> addToCSV ( $ fieldArray ) ; }
Add header line with field names as CSV line
Add header line with field names as CSV line