Add voted entity type, ID and field name to theming

Created on 27 August 2025, about 2 months ago

Problem/Motivation

I found that it's impossible to find the voted entity type, ID, and field name in the votingapi_reaction_item preprocess hook.
This might be useful for customization purposes; in our specific case, we need this info to attach analytics to reactions.

Proposed resolution

Check the MR adding variables to the theme hook.

Remaining tasks

Review and merge.

User interface changes

None.

API changes

New variables added; they're nullable in the VotingApiReactionManager::getReactions() for backwards compatibility (in case someone used the public method in their custom code).

Data model changes

None.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇺🇦Ukraine abramm Lutsk

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024