[development] The future of hook_node_info()
catch56 at googlemail.com
Thu May 21 14:07:07 UTC 2009
I'd love to see it go, but Larry's explanation matches what I've been told
when it's been discussed before. It'd also be worth grepping Drupal 6
contrib to see which modules are using it and how.
On Thu, May 21, 2009 at 2:57 PM, Larry Garfield <larry at garfieldtech.com>wrote:
> On Thursday 21 May 2009 7:54:03 am Arancaytar Ilyaran wrote:
> > Will hook_node_info() eventually die entirely, in favor of working on
> > nodes centrally handled by node.module? Should it?
> > Thanks for reading all the way, :)
> > -Aran
> Potentially, but there are two key things that need to happen first:
> 1) There are still things that can only be done by a custom-defined node in
> own module. The most notable is hook_access(), which still must be defined
> the declaring module if you want permissions that differ even ever so
> from what node module defaults to. That needs to get ripped out and made
> pluggable per-type, and stackable. There has bee discussion on how to do
> well back in Szeged, but unfortunately no one who was at that BoF has had
> spare mental cycles to work on it. :-( (If you want to volunteer, let me
> and I'll try to help.) I think there's a few others items that must be
> by the declaring module still, but I can't recall them off the top of my
> 2) Easy programmatic creation of new nodes. Some modules need to have
> behavior that comes with their nodes. Poll is a text-book example. For
> hook_node_info() to go away, it would need to be replaced by a *good*,
> to use*, *flexible* way to declare a node type and additional behavior (eg,
> Fields) in a way that could be easily imported on module installation;
> patterns.module looks like it could be a step in that direction (I
> it's in the process of moving away from doing everything via
> which is good), but there are other efforts along similar lines.
> If you want to kill hook_node_info(), tackle one of those problems first.
> Larry Garfield
> larry at garfieldtech.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development