Fix include_source and source_key docs for SubProcess

Created on 30 November 2021, almost 3 years ago
Updated 1 July 2024, 2 months ago

API page: https://api.drupal.org/api/drupal/core%21modules%21migrate%21src%21Plugi...

> include_source: (optional) If TRUE, all source plugin configuration and values will be copied into the sub-processed row in a new property named for the source_key configuration value (see below). Defaults to FALSE.

It's not the plugin configuration, but the source row values.

Example:
Result of dump($new_row->getSource()); in SubProcess::transform():
Without 'include_source', we have just the field values for the single delta:

array:2 [
  "target_id" => "16540"
  "target_revision_id" => "1649177"
]

With 'include_source', we have the field values for the single delta, and all the source values from the parent row, which in this case is a node:

  "target_id" => "16540"
  "target_revision_id" => "1649177"
  "source" => array:40 [
    "nid" => "1042"
    "uuid" => array:1 [
      0 => array:1 [
        "value" => "1b55a56c-f636-47bb-a69e-7531cca7acbd"
      ]
    ]
    "vid" => "24954"
    "langcode" => "en"
    "type" => array:1 [
      0 => array:1 [
        "target_id" => "homepage"
      ]
    ]
// SNIP

> which will contain the source configuration and values

Same as above -- it's just the values.

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
MigrationΒ  β†’

Last updated 1 day ago

Created by

πŸ‡¬πŸ‡§United Kingdom joachim

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024