[development] hook_theme vs hook_elements?!?!

Darrel O'Pry dopry at thing.net
Mon Dec 3 11:51:35 UTC 2007

I'm confused about hook_theme. I should have been paying more attention
to that discussion. It seems to duplicate a lot of the functionality of
the existing render api. I was wondering if someone could help me
understand the differentiation and use cases for the similar features?

A quick overview of functional duplication...

The hook_theme 'arguments' property seems like it would be roughly
equivalent to the way element property default values are set using

The hook_theme 'function' property seems very similar to how '#theme'
functions currently.

The hook_theme 'preprocess' property seems very similar to the render
api's '#pre_render'

The hook_theme 'override preprocess' seems to provide the same
functionality as hook_view_alter...


More information about the development mailing list