This project is not covered by Drupal’s security advisory policy.
External Entities String Functions and JSONPath Field Mapper is a field mapper plugin that extends the features of the JSONPath field mapper with current string functions (concatenate, sub-string, replace, etc.).
Features
With the default field mapping plugins, it is not possible to use parts of multiple field values to generate a new one. However, in some cases, it might be convenient to do so. For instance, when using xnttmulti to aggregate multiple sources into one external entity type, it might be convenient to be able to reference other entities according to the initial source of a given instance. Let's say I have an external entity "aggreg" that uses 2 REST service sources (alpha and beta) using xnttmulti: source "alpha" and "beta" provide the same field values but are differentiated by a prefix added to their identifier (using xnttmulti features). Therefore, on alpha and beta REST services, I could find an entity using the id "123" but from Drupal external entity "aggreg", I would have 2 entities, one with the identifier "a123" and another with "b123". So far, so good. But now, if those entities have a reference to an other entity, for instance a "child" entity, it would use the identifier of the source. If alpha "123" entity has a child "456", the corresponding Drupal external entity aggreg "a123" would just have a "456" identifier without prefix. Impossible to tell if it refers to "alpha" or "beta". This plugin can be used to solve that case by using a sub-string of the entity identifier that would extract the "source prefix" (ie. "a" or "b") and prefix it to the child reference field, so we would have "a456" that would refer to the correct source.
Similar projects
External Entities JSONPath field mapper (currently included in External Entities module).
Community Documentation
Not available yet.
Project information
- Ecosystem: External Entities
10 sites report using this module
- Created by guignonv on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
Xntt v3 compatibility
Development version: 1.0.x-dev updated 15 Sep 2025 at 14:02 UTC
