Sometimes when we integrate external entities with external APIs or databases that we cannot control, the data received does not always match the format expected by Drupal. A clear example can be dates, or URLs to internal files that need to be imported to Drupal to be able to show them.

This module allows generating different processors for these cases quickly and easily and with a fieldmapper to associate those processors to the appropriate fields of the external entity.

Requirements

This module requires the following modules:

Installation

Install as you would normally install a contributed Drupal module. For further information, see Installing Drupal Modules.

Configuration

  1. Enable the module at Administration > Extend.
  2. If you already have an exernal entitie created, go to its edition page. If not, create one as you would normally.
  3. On Field mapper, select Fields processors mapper
  4. Select for each mapped field, the processor you want to use.

FAQ

Q: How do I write a field processor?

A: Create a custom module, and add a new class in src/Plugin/ExternalEntities/FieldMapProcessor/. Create a class that extends FieldMapProcessorBase and add an annotation like this:

/**
 * This is a description of what my processor does.
 *
 * @FieldMapProcessor (
 *   id = "mi_own_processor",
 *   label = @Translation("My Processor"),
 *   description = @Translation("Thiw is what my processor does."), 
 *   field_types = "text,textarea"
 * )
 */

Maintainers

Supporting organizations: 

Project information

Releases