hwezimport

UNIX name Owner Status
hwezimport 7x stable
Version Compatible with
N/A N/A
Generic eZPublish import framework

HwImport

HwImport is a generic handler-based import framework for eZPublish (tested on 4.3.0).

Installation

Drop extension/hwimport to your extension directory and bin/php/hwimport.php to your bin/php directory. Then activate the extension for your site. E.g. in settings/override/site.ini.append.php:

ActiveExtensions[]=hwimport

Usage

php bin/php/hwimport.php --handler=MyCustomHandler --data=/tmp/importdata.xlsx --parentnode=1234 --userid=15 --limit=15

Options:
--handler=VALUE Handler identifier
--data=VALUE Data file
--parentnode=VALUE Parent node ID
--userid=VALUE ID of importing user

Optional options:
--offset=VALUE Offset from the starting row
--limit=VALUE Limit number of imported records

Writing handlers

Handlers are responsible for parsing the input data and mapping the data to an eZPublish content object. See the examples directory for an extension containing a sample handler which imports data from an Excel 2007 file.

Basic workflow is the following:

  1. Write a handler implementing HwImport_Handler_Interface or extending HwImport_Handler_Abstract which is registering itself to HwImport::register() (see example).
  2. Add your handler directory to HandlerDirs[] in a hwimport.append.ini.php file (e.g. in settings/override or in your custom extension).
  3. Call the CLI script and pass your handler's identifier to the --handler option.

No news yet.

This project has no reviews yet. Be the first one to review it!

No forum messages yet.