Problem/Motivation

FlagCountManagerInterface::getCounts() takes two parameters, the flaggable entity type and ID. While we only need the type and ID for the method to operate, does it make sense in D8's object heavy world?

Proposed resolution

Replace both parameters with an EntityInterface. Arguably this would be easier in practice when working with the module than passing the type and ID.

Remaining tasks

User interface changes

None.

API changes

The parameters to FlagCountManagerInterface::getCounts() would change.

CommentFileSizeAuthor
#2 entity-2479813-2.patch2.71 KBmartin107

Comments

joachim’s picture

Issue summary: View changes
martin107’s picture

Status: Active » Needs review
StatusFileSize
new2.71 KB

So this is what is looks like....

I have made a small out of scope change.

while inserting EntityInterface into the list of 'use' statement at the top of FlagCountManagerInterface I reordered the list of 3 things into alphabetical order. :)

socketwench’s picture

Status: Needs review » Reviewed & tested by the community

Liking it so far.

joachim’s picture

Status: Reviewed & tested by the community » Fixed

Committed with a couple of small tweaks:

- I don't want to lose the blank line that comes after the initial static $var
- no point in changing the summary line here; we have a separate issue for rewriting the docs

  • joachim committed 51afab6 on authored by martin107
    Issue #2479813 by martin107: Changed FlagCountManagerInterface::...
joachim’s picture

CR updated.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.