Problem/Motivation
Give me all the redirects to node 123
Proposed resolution
Add a new method ::findByDestinationUri() in the redirect.repository service that allows to pass the destination URI and retrieves a list of redirects redirecting to that URI.
Remaining tasks
None.
User interface changes
None.
API changes
New method: \Drupal\redirect\RedirectRepository::findByDestinationUri().
Data model changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2884587-2.patch | 834 bytes | claudiu.cristea |
Comments
Comment #2
claudiu.cristeaPatch.
Comment #3
michelleThis new function is working for me. Using it in the patch in #2702353: Vertical tab for listing redirects to content/entities missing
Comment #4
berdirI'm not sure I see the benefit of adding this in a separate issue. We'll need tests if we do that. Also we might want to support multiple destinations, nodes can for example by referenced as internal:/node/1 or entity:node/1, depends on how the redirect is created.
Comment #5
claudiu.cristea@Berdir,
You mean passing the
$destination_urimethod argument as an array of destination URIs?Comment #6
mpp commentedAs stated in #3: the patch in #2 has already been committed on 2702353 #47.