Download the PHP package heimrichhannot/contao-exporter without Composer
On this page you can find all versions of the php package heimrichhannot/contao-exporter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download heimrichhannot/contao-exporter
More information about heimrichhannot/contao-exporter
Files in heimrichhannot/contao-exporter
Package contao-exporter
Short Description A backend module for exporting any contao entity to file.
License LGPL-3.0+
Homepage https://github.com/heimrichhannot/contao-exporter
Informations about the package contao-exporter
Exporter
A module for exporting any contao entity.
Export config preview
Features
- export an entity list in the backend
- export of entities in the frontend
- currently supported file types:
- csv
- xls
- 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:
Step 2
Add your backend module in your entity's config.php as follows:
Step 3
Create a configuration for your export by using the exporter's backend module (group devtools).
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!
Step 1
Create a configuration for your export by using the exporter's backend module (group devtools).
Step 2
Add the following code to your module in order to your module:
If you add , this array will be iteratd automatically in your template. Alternatively you can print every entity's property using $this in the template.
All versions of contao-exporter with dependencies
contao/core-bundle Version ^3.5.1 || ~4.1
contao-community-alliance/composer-plugin Version ~2.4 || ~3.0
phpoffice/phpexcel Version >=1.8.1
heimrichhannot/contao-haste_plus Version >=1.3.23
heimrichhannot/contao-fieldpalette Version >=1.2