heimrichhannot / contao-exporter
A backend module for exporting any contao entity to file.
Installs: 1 337
Dependents: 1
Suggesters: 4
Security: 0
Stars: 1
Watchers: 5
Forks: 0
Open Issues: 2
Type:contao-module
Requires
- php: ~5.4 || ~7.0
- contao-community-alliance/composer-plugin: ~2.4 || ~3.0
- contao/core-bundle: ^3.5.1 || ~4.1
- heimrichhannot/contao-fieldpalette: >=1.2
- heimrichhannot/contao-haste_plus: >=1.3.23
- phpoffice/phpexcel: >=1.8.1
- dev-master
- 4.2.5
- 4.2.4
- 4.2.3
- 4.2.2
- 4.2.1
- 4.2.0
- 4.1.0
- 4.0.11
- 4.0.10
- 4.0.9
- 4.0.8
- 4.0.7
- 4.0.6
- 4.0.5
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.0.10
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.2.6
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.2
- 2.0.1
- 2.0.0
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is not auto-updated.
Last update: 2024-11-09 19:28:22 UTC
README
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
Hooks
Technical instruction
Backend export
Step 1
Define your global operation in your entity's dca as follows:
'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:
$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).
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:
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.