Download the PHP package heimrichhannot/contao-exporter-bundle without Composer

On this page you can find all versions of the php package heimrichhannot/contao-exporter-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package contao-exporter-bundle

Contao Exporter Bundle

A module for exporting any contao entity to file.

Export config preview

Features

Csv and Excel export are archived by Spout library. PDF export is archived by mPDF library. This library comes not as dependency and therefore must be added to your bundle/project dependencies to archvie pdf export functionality.

Technical instruction

Install

Install with composer:

If you want to use the pdf exporter, add "mpdf/mpdf":"^7.0" to your composer dependencies.

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 the included frontend module to add an easy export functionality.

You can also 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!

You can also create an custom implementation for your extension:

1) Create a configuration for your export by using the exporter's backend module (group devtools). 2) Call export() of huh.exporter.action.frontendexport service in your module:

Developers

Upgrade from exporter module

Please see Upgrade Instructions.

Events

You can hook into the export with given event. Please check Symfony Event Documentation if you don't know how.

Eventname Event-ID Description
Before Export huh.exporter.event.before_export Fired before start of export. Customize file name and file path.
Before Build Query huh.exporter.event.before_build_query Fired before building and executing the query for collecting list content.
Modify Table Header field huh.exporter.event.modifyheaderfields Modify header field values in tables.
Modify Table field value huh.exporter.event.modifyfieldvalue Fired before writing a table value to the table object (e.g. spreadsheet).
Modify Media File Name huh.exporter.event.modifymediafilename Modify media file before adding to archive (filename and file object).

Add custom exporter

You can add custom exporter to add additional file types or functionality.

Your exporter class must implement ExporterInterface and must be registered in the container with the huh_exporter.exporter service tag. We recommend to extend AbstractExporter, because it already has most of the mechanics implemented.

Custom field selection

You can pass an array of fields to export() of an exporter. Those fields will be used, when exporting an item.

There are two options: 1) A list of field names. Example: ['firstname','lastname','age'] 2) A field list with labels and values. Should be structured as shown:

Pdf

To use Pdf export, you first need to install mPDF.

Templates

You can overwrite the pdf output template. Templates are written in Twig and name should start with exporter_pdf_. See exporter_pdf_item_default.html.twig for a working example.

Fonts

To add custom Pdf font, please see the corresponding chapters in Utils Bundle docs and the mPDF Docs. Afterwards you can add the folders in the exporter config.


All versions of contao-exporter-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
contao/core-bundle Version ^4.9
box/spout Version ^2.7
heimrichhannot/contao-field-value-copier-bundle Version ^1.1
heimrichhannot/contao-multi-column-editor-bundle Version ^1.2 | ^2.0
heimrichhannot/contao-utils-bundle Version ^2.207
symfony/cache Version ^4.4 || ^5.2
symfony/config Version ^4.4||^5.4
symfony/console Version ^4.4||^5.4
symfony/dependency-injection Version ^4.4||^5.4
symfony/event-dispatcher Version ^4.4||^5.4
symfony/event-dispatcher-contracts Version ^1||^2||^3
symfony/http-kernel Version ^4.4||^5.4
symfony/http-foundation Version ^4.4||^5.4
symfony/translation Version ^4.4||^5.4
symfony/translation-contracts Version ^1.1.6||^2||^3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package heimrichhannot/contao-exporter-bundle contains the following files

Loading the files please wait ....