The FacetsPrettyPathsUrlProcessor class extends UrlProcessorPluginBase in a manner that makes it hard to inherit the class and override some methods.
As a result, a developer who wants to implement custom URL construction rules (like me) is forced to literally copy-paste the whole class.
The patch below addresses some of these issues, splitting monolithic class methods into few smaller ones which I hope should make it easier to maintain and extend.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | facets_pretty_paths-refactor_url_processor-2956977-9.patch | 15.54 KB | rollins |
| #3 | facets_pretty_paths-refactor_url_processor-2956977-3.patch | 15.94 KB | abramm |
Comments
Comment #2
abrammI've also addressed few coding standards issues and replaced some static function calls with services.
I know that's a bit out of scope but I did it since I was moving few chunks of code anyway.
Comment #3
abrammHere's a re-roll for latest dev.
Could someone please review this patch? It does not change any functionality or anything, just makes code more friendly to third-party developers.
Thanks!
Comment #4
borisson_This looks solid at first glance. I'm in favor of the idea.
Comment #5
upchuk commented@abramm would you like to reroll this in a PR on github?
Changes have been committed, it's now also tested.
Comment #6
upchuk commentedPlease be aware that I also merged #3005452: Active filters logic abstraction which moves the active filters logic to another service.
Comment #7
abrammHi @Upchuk,
Unfortunately I'm not working on any project using facets anymore. I'd be happy to support someone doing a re-roll or any further job on this thought.
Comment #8
upchuk commentedAlright, closing then. Thanks.
Comment #9
rollins commentedI had the same issue, so I updated patch for 1.0 version of Facets Pretty Paths module.
Comment #10
lukasss commented+ 1 for refactor this plugin class