Closed (works as designed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
field system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 Apr 2010 at 09:51 UTC
Updated:
14 Apr 2015 at 22:37 UTC
Jump to comment: Most recent
Comments
Comment #1
sunsubscribing
Comment #2
sunI guess you primarily mean _field_invoke() ?
Issue with that is that it's not using drupal_alter(). But I agree that this would be helpful for performance and code flow. We'd need to introduce a similar technique for module_invoke(), I guess.
That said, I always wondered why drupal_alter() is much more advanced than our module_invoke*() functions...
Comment #3
effulgentsia commentedSubscribing. Push the code in drupal_alter() that supports $type as an array into module_implements(), letting it support $hook as an array? Is there sufficient buy-in to get that into D7?
Comment #4
sunHow could that work out? Usually the code flow is like this:
or
The only location where it would make more sense to me is:
However, http://api.drupal.org/api/function/_field_invoke/7 is really far more than a simple module_invoke()...
If there was a module API function that would look and work like the following, then it would start to make sense:
LOL ;)
Comment #5
sunLooks like we want to tackle module_implements() in the same way as drupal_alter() as early as possible in D8 :)
Comment #6
fagosubscribe
Comment #7
jhedstromI think this has been reworked entirely. See https://www.drupal.org/node/2193813.