2017 © Pedro Peláez
 

contao-module contao-exporter

A backend module for exporting any contao entity to file.

image

heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  • Monday, April 9, 2018
  • by digitales@heimrich-hannot.de
  • Repository
  • 5 Watchers
  • 1 Stars
  • 950 Installations
  • PHP
  • 2 Dependents
  • 3 Suggesters
  • 0 Forks
  • 2 Open issues
  • 58 Versions
  • 11 % Grown

The README.md

Exporter

A module for exporting any contao entity., (*1)

alt myModulePreview, (*2)

Export config preview, (*3)

Features

  • export an entity list in the backend
  • export of entities in the frontend
  • currently supported file types:
    • csv
    • xls
    • pdf
    • zip (media file export as zip)

Classes

Name Description
CsvExporter An exporter for writing entity instances into a CSV file
XlsExporter An exporter for writing entity instances into an excel file (XLS)
MediaExporter An exporter that combines all files referenced by the selected properties of an entity in one archive file (e.g. zip) preserving the folder structure
PdfExporter An exporter for creating a pdf out of an entity

Hooks

Name Arguments Expected return value Description
exporter_modifyHeaderFields $arrFields, $objExporter $arrFields Modify the header fields just before just before being written to file
exporter_modifyMediaFilename $objFile, $strFieldname, $varFieldValue, $objMediaExporter $objFile->path Modify a filename just before added to the archive when using MediaExporter (also folder structure could be modified here)
exporter_modifyFilename $strFilename, $objExporter $strFilename Modify the export filename
exporter_modifyFilePath $strFilePath, $objExporter $strFilePath Modify the export file path
exporter_modifyFieldValue $varValue, $strField, $arrRow, $intCol $varValue Modify the field values. Only available in PhpExcelExporter

Technical instruction

Backend export

Step 1

Define your global operation in your entity's dca as follows:, (*4)

'global_operations' => array
(
    'export_csv' => \HeimrichHannot\Exporter\ModuleExporter::getGlobalOperation('export_csv',
                 $GLOBALS['TL_LANG']['MSC']['export_csv'],
                 'system/modules/exporter/assets/img/icon_export.png')
),

Step 2

Add your backend module in your entity's config.php as follows:, (*5)

$GLOBALS['BE_MOD']['mygroup'] = array
(
    'export_csv' => \HeimrichHannot\Exporter\ModuleExporter::getBackendModule()
),

Step 3

Create a configuration for your export by using the exporter's backend module (group devtools)., (*6)

Frontend

You can use frontendedit or formhybrid_list in order to easily create a module for manipulating your entities in the frontend. It already contains a function to export entities after submission!, (*7)

Step 1

Create a configuration for your export by using the exporter's backend module (group devtools)., (*8)

Step 2

Add the following code to your module in order to your module:, (*9)

ModuleExporter::export($objConfig, $objEntity, $arrFields);

If you add $arrFields, this array will be iteratd automatically in your template. Alternatively you can print every entity's property using $this in the template., (*10)

The Versions

20/03 2017

4.0.4

4.0.4.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

17/03 2017

4.0.3

4.0.3.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

17/03 2017

4.0.2

4.0.2.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

17/03 2017

4.0.0

4.0.0.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

13/03 2017

3.0.10

3.0.10.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

21/02 2017

3.0.9

3.0.9.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

21/02 2017

3.0.8

3.0.8.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

19/01 2017

3.0.7

3.0.7.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

19/01 2017

3.0.6

3.0.6.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

05/12 2016

3.0.5

3.0.5.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

05/12 2016

3.0.4

3.0.4.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

05/12 2016

3.0.3

3.0.3.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

05/12 2016

3.0.2

3.0.2.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

23/11 2016

3.0.1

3.0.1.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

21/11 2016

3.0.0

3.0.0.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

21/10 2016

2.2.6

2.2.6.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

29/09 2016

2.2.5

2.2.5.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

29/09 2016

2.2.4

2.2.4.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

29/09 2016

2.2.3

2.2.3.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

02/09 2016

2.2.2

2.2.2.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

11/07 2016

2.2.1

2.2.1.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

05/07 2016

2.2.0

2.2.0.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

30/06 2016

2.1.2

2.1.2.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

03/06 2016

2.1.1

2.1.1.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

03/06 2016

2.1.0

2.1.0.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

23/05 2016

2.0.2

2.0.2.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

23/05 2016

2.0.1

2.0.1.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

23/05 2016

2.0.0

2.0.0.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

02/05 2016

1.0.18

1.0.18.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

02/05 2016

1.0.17

1.0.17.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

21/04 2016

1.0.16

1.0.16.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

21/04 2016

1.0.15

1.0.15.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

19/04 2016

1.0.14

1.0.14.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

19/04 2016

1.0.13

1.0.13.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

11/04 2016

1.0.12

1.0.12.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

11/04 2016

1.0.11

1.0.11.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

14/03 2016

1.0.10

1.0.10.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

22/02 2016

1.0.9

1.0.9.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

16/02 2016

1.0.8

1.0.8.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

02/02 2016

1.0.7

1.0.7.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

02/02 2016

1.0.6

1.0.6.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

01/02 2016

1.0.4

1.0.4.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

17/11 2015

1.0.3

1.0.3.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

17/11 2015

1.0.2

1.0.2.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

17/11 2015

1.0.1

1.0.1.0 https://github.com/heimrichhannot/contao-exporter

A backend module for exporting any contao entity to file.

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer

13/11 2015

1.0.0

1.0.0.0 https://github.com/heimrichhannot/contao-exporter

A backend module for export configurations

  Sources   Download

LGPL-3.0+

The Requires

 

csv xls module export backend contao developer