{"id":20961918,"url":"https://github.com/heimrichhannot/contao-exporter","last_synced_at":"2026-04-27T13:34:58.202Z","repository":{"id":62515466,"uuid":"45986127","full_name":"heimrichhannot/contao-exporter","owner":"heimrichhannot","description":"A backend module for export configurations","archived":false,"fork":false,"pushed_at":"2018-09-11T12:18:28.000Z","size":191,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-12-30T22:36:33.221Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heimrichhannot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-11T14:20:40.000Z","updated_at":"2018-09-11T12:18:20.000Z","dependencies_parsed_at":"2022-11-02T10:17:22.947Z","dependency_job_id":null,"html_url":"https://github.com/heimrichhannot/contao-exporter","commit_stats":null,"previous_names":[],"tags_count":61,"template":false,"template_full_name":null,"purl":"pkg:github/heimrichhannot/contao-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heimrichhannot","download_url":"https://codeload.github.com/heimrichhannot/contao-exporter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimrichhannot%2Fcontao-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32339289,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T02:18:34.517Z","updated_at":"2026-04-27T13:34:58.182Z","avatar_url":"https://github.com/heimrichhannot.png","language":"PHP","readme":"# Exporter\n\nA module for exporting any contao entity.\n\n![alt myModulePreview](docs/screenshot.png)\n\n*Export config preview*\n\n## Features\n\n- export an entity list in the backend\n- export of entities in the frontend\n- currently supported file types:\n    - csv\n    - xls\n    - pdf\n    - zip (media file export as zip)\n\n### Classes\n\nName | Description\n---- | -----------\nCsvExporter | An exporter for writing entity instances into a CSV file\nXlsExporter | An exporter for writing entity instances into an excel file (XLS)\nMediaExporter | 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\nPdfExporter | An exporter for creating a pdf out of an entity\n\n### Hooks\n\nName | Arguments | Expected return value | Description\n---- | --------- | --------------------- | -----------\nexporter_modifyHeaderFields | $arrFields, $objExporter | $arrFields | Modify the header fields just before just before being written to file\nexporter_modifyMediaFilename | $objFile, $strFieldname, $varFieldValue, $objMediaExporter | $objFile-\u003epath | Modify a filename just before added to the archive when using *MediaExporter* (also folder structure could be modified here)\nexporter_modifyFilename | $strFilename, $objExporter | $strFilename | Modify the export filename\nexporter_modifyFilePath | $strFilePath, $objExporter | $strFilePath | Modify the export file path\nexporter_modifyFieldValue | $varValue, $strField, $arrRow, $intCol | $varValue | Modify the field values. Only available in PhpExcelExporter\n\n## Technical instruction\n\n### Backend export\n\n### Step 1\nDefine your global operation in your entity's dca as follows:\n\n```\n'global_operations' =\u003e array\n(\n    'export_csv' =\u003e \\HeimrichHannot\\Exporter\\ModuleExporter::getGlobalOperation('export_csv',\n                 $GLOBALS['TL_LANG']['MSC']['export_csv'],\n                 'system/modules/exporter/assets/img/icon_export.png')\n),\n```\n\n### Step 2\nAdd your backend module in your entity's config.php as follows:\n\n```\n$GLOBALS['BE_MOD']['mygroup'] = array\n(\n    'export_csv' =\u003e \\HeimrichHannot\\Exporter\\ModuleExporter::getBackendModule()\n),\n```\n\n### Step 3\nCreate a configuration for your export by using the exporter's backend module (group devtools).\n\n## Frontend\n\nYou can use [frontendedit](https://github.com/heimrichhannot/contao-frontendedit) or [formhybrid_list](https://github.com/heimrichhannot/contao-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!\n\n### Step 1\nCreate a configuration for your export by using the exporter's backend module (group devtools).\n\n### Step 2\nAdd the following code to your module in order to your module:\n\n```\nModuleExporter::export($objConfig, $objEntity, $arrFields);\n```\n\nIf 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.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheimrichhannot%2Fcontao-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheimrichhannot%2Fcontao-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheimrichhannot%2Fcontao-exporter/lists"}