Problem/Motivation

In current code, there is no method to unflag specific flag ID of a user

Steps to reproduce

Proposed resolution

Add a method to \Drupal\flag\FlagService - perhaps call it unflagAllByFlagIdOfUser

Remaining tasks

1. add the method
2. use it in \Drupal\flag\FlagService::unflagAllByFlagIdOfUser

User interface changes

API changes

Data model changes

Issue fork flag-3567627

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

suryabhi created an issue. See original summary.

suryabhi’s picture

Title: Service method to remove specific flag entity of a user » Service method to unflag specific flag entity of a user
Issue summary: View changes
suryabhi’s picture

Version: 8.x-4.0-beta7 » 5.x-dev

suryabhi’s picture

Title: Service method to unflag specific flag entity of a user » Service method to unflag specific flag ID of a user
Issue summary: View changes
suryabhi’s picture

Issue summary: View changes
suryabhi’s picture

Status: Active » Needs review
deaom’s picture

Isn't this already addressed in #3034896: FlagService - unflagAllByUserByFlag? What's the difference?

suryabhi’s picture

In #3034896, You have created a separate method to address it but in my PR change i am using existing method to address it. The point, if we handle it through the existing method why we need to create new one

ivnish’s picture

Status: Needs review » Closed (duplicate)

Adding a new parameter in the middle to the existing methods like "unflagAllByUser" breaks a lot of sites. I can't approve this. Also already commited the same method https://git.drupalcode.org/project/flag/-/commit/88e93bb5bf1b342e917b815...

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.