Make flagLinkBuilder to return the flag link in any desired type irrespective of what is set in flag config.

Created on 19 July 2022, over 2 years ago
Updated 19 October 2024, about 1 month ago

Problem/Motivation

I have create a new flag action link for my rest API which returns the href of the flagging/unflagging link. When I set the link type in flag to my custom action link it is applied throughout the site and all the flag links are rendered in the same way, which is not required.

Proposed resolution

Pass a new parameter in flagLinkBuilder->build for $link_type. If this parameter is present then that particular link type will be returned or else the default one set in flag config.

📌 Task
Status

Needs work

Version

4.0

Component

Flag core

Created by

🇮🇳India darshanchoudhary

Live updates comments and jobs are added and updated live.
  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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