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.
Now the compute and display function names are hardcoded.
We could use a hook to specify the compute and display functions.
Comment | File | Size | Author |
---|---|---|---|
#5 | 1514788-compute_and_display_functions_declared_in_hooks.patch | 18.39 KB | skipyT |
#1 | 1514788-compute_and_display_functions_declared_in_hooks.patch | 13.97 KB | skipyT |
Comments
Comment #1
skipyT CreditAttribution: skipyT commentedI've created a patch file which creates 2 new hooks:
- hook_computed_field().
- hook_computed_field_alter().
Where you can specify the compute and display functions for each computed field.
Comment #2
skipyT CreditAttribution: skipyT commentedI modified a little the patch file.
Still needs review.
Comment #3
diggingrelic CreditAttribution: diggingrelic commentedI would like to see this implemented. I hope someone gets to this soon.
Comment #4
skipyT CreditAttribution: skipyT commentedI made the patch file, I'm using it on a huge project but noone reviewed it from the module maitainers.
I also asked for maitaining the module, but I didn't get any reply... I would be glad to help on maitaining this module, but this is difficult with patch files only...
Comment #5
skipyT CreditAttribution: skipyT commentedI saw now, that I forgot to attach the new patch file. This is a fully functional implementation of the hook system to compute the fields.
Comment #6
colanNew features go into the latest dev branch.