Skip to content

Commit

Permalink
Merge pull request #13 from calien666/bugfix/export-trait-event-dispatch
Browse files Browse the repository at this point in the history
[BUGFIX] Enable ExportTrait Events
  • Loading branch information
calien666 authored Aug 19, 2024
2 parents 1e618d6 + fbba277 commit 7452da9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- name: Check tag
run: |
if ! [[ ${{ github.ref }} =~ ^refs/tags/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$ ]]; then
if ! [[ ${{ github.ref }} =~ ^refs/tags/v?[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$ ]]; then
exit 1
fi
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Install Dependencies - move old composer.json
run: |
mv composer.json composer.json-orig
composer require phpoffice/phpspreadsheet ^1.10 --ignore-platform-reqs --no-progress
composer require phpoffice/phpspreadsheet ^1.29 --ignore-platform-reqs --no-progress
mv composer.json-orig composer.json
rm composer.lock
Expand Down
6 changes: 3 additions & 3 deletions Classes/Traits/ExportTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected static function writeHeader(Worksheet $sheet, array $headerFields)
* @param bool $autoFilter
* @param array $hookArray @deprecated
*/
protected static function writeExcel(
protected function writeExcel(
Worksheet $sheet,
array $dataset,
array $exportFields,
Expand All @@ -91,13 +91,13 @@ protected static function writeExcel(
$colIndexer = 0;
foreach ($exportFields as $colIndexer => $value) {
$manipulateCellData = new ManipulateCellDataEvent($value, $currentData, $currentData[$value]);
if (!empty($this)) {
if (!empty($this->eventDispatcher)) {
$this->eventDispatcher->dispatch($manipulateCellData);
}
$sheet->setCellValue(self::$cols[$colIndexer] . self::$rowCount, $manipulateCellData->getValue());
}
$colIndexer++;
if (!empty($this)) {
if (!empty($this->eventDispatcher)) {
$this->eventDispatcher->dispatch(new AddColumnsToSheetEvent($sheet, $colIndexer, self::$rowCount));
}
if (array_key_exists($table, $hookArray) && is_array($hookArray[$table])) {
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
'author_company' => '',
'state' => 'beta',
'clearCacheOnLoad' => 0,
'version' => '3.1.4',
'version' => '3.1.5',
'constraints' => [
'depends' => [
'typo3' => '11.5.0-11.5.99',
Expand Down

0 comments on commit 7452da9

Please sign in to comment.