Now $entity_type can be retrieved from $entity, so it is no longer necessary.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1643362-3.patch | 509 bytes | swentel |
Now $entity_type can be retrieved from $entity, so it is no longer necessary.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1643362-3.patch | 509 bytes | swentel |
Comments
Comment #1
dawehnerThe question is: do you want to have a single uri callback for multiple entity types?
Comment #2
jcisio commentedI'm not sure I get it. Currently Entity::uri returns an array that contain $entity, so it does not needs to return $entity->entityType because it is redundant.
Comment #3
swentel commentedIt is kind of redundant indeed.
Comment #4
dawehnerYeah if you really want you can always get the entity type from the entity itself.
Additional this feature was never considered to be important given that there is no test coverage for that in core.
Comment #5
jcisio commentedExactly!
Comment #6
alexpottCommitted ad0a71a and pushed to 8.x. Thanks!