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
- Debate the merits of this change.
- Create and test patch.
- Update existing CR at https://www.drupal.org/node/2476349.
User interface changes
None.
API changes
The parameters to FlagCountManagerInterface::getCounts() would change.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | entity-2479813-2.patch | 2.71 KB | martin107 |
Comments
Comment #1
joachim commentedComment #2
martin107 commentedSo 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. :)
Comment #3
socketwench commentedLiking it so far.
Comment #4
joachim commentedCommitted 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
Comment #6
joachim commentedCR updated.