Pass the Job Item in hook_tmgmt_translatable_fields_alter as additional context

Created on 2 January 2025, 4 months ago

Problem/Motivation

In our use case, we need to only include certain fields when the job item is created for a referenced entity, e.g. a referenced node we only want the title and a couple of other fields to be created for that job item. We need to be able to alter the fields, but need information from the job item when we implement hook_tmgmt_translatable_fields_alter().

Proposed resolution

Add the job_item variable as additional context

Remaining tasks

Review, test, and approve.

API changes

One extra parameter for the job item in hook_tmgmt_translatable_fields_alter().

Feature request
Status

Active

Version

1.0

Component

Source: Entity

Created by

🇬🇧United Kingdom Dubs

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024