Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
On a project I'm working on we needed a plugin condition for the domain name and a colleague suggested it might be suitable for ctools.
Thanks
Comment | File | Size | Author |
---|---|---|---|
#11 | interdiff_10-11.txt | 588 bytes | AndyF |
#11 | ctools-domain_name_condition_plugin-2898191-11-D8.patch | 7.33 KB | AndyF |
#10 | interdiff_5-10.txt | 1.81 KB | thalles |
Comments
Comment #2
AndyF CreditAttribution: AndyF at TES Global commentedThanks
Comment #3
dawehnerIs there a reason we couldn't store a list of domains instead of store them as a string?
Kudos for writing a test!
Comment #4
dawehnerIt also sounds like we are missing some config dependency change missing.
Comment #5
AndyF CreditAttribution: AndyF at TES Global commented@dawehner thanks for the review!
Not really, it's a hangover from basing it on
\Drupal\system\Plugin\Condition\RequestPath
. I've updated it.Done, thanks!
Comment #6
dawehnerThis looks great for me!
Comment #7
thallesFollow the patch!
Comment #8
thallesFollow the new patch!
Comment #10
thallesFollow the patch!
Comment #11
AndyF CreditAttribution: AndyF at Fabb commentedThanks! And one last bit of follow-up cleaning: if splitting an array over multiple lines, each element should be on a separate one. If the tests run green I think this can be moved back to RTBC as the changes since #5 are small.
@thalles For what it's worth, I find the phrase "follow the patch" a little meaningless - from my PoV it would be great to describe what you're doing and why when updating an issue - but thanks for your time and attention!
Comment #12
AndyF CreditAttribution: AndyF at Fabb commentedMoving to RTBC per #5, see interdiff_5-10.txt and interdiff_10-11.txt which just include a typehint for the request stack and a couple of code formatting touch-ups.
Thanks!
Comment #13
thallesThanks @AndyF!
Comment #14
joelpittetI don't think I'd like to add this to ctools as it seems a narrow case but I encourage you to add a ctools_domain module.