All the docs and answers i read about render arrays dive into the deep before learning to swim. Very frustrating, I would like to have a minimal example.
Assuming this is a valid render array (correct me if its wrong or if it can be smaller)
$rarr = array(
'whoopie'=>array(
'foo' => $bar,
'#theme' => 'quz'
)
);
- where does 'whoopie' go ? is it used at all ?
- how would I define the theme 'quz' using HOOK_theme
for each possible 'render element' in the definition
- how would a method receive the variable
$bar
? - how would a template receive the variable
$bar
?
- how would a method receive the variable
Please, dont get into too much details. What I want is a working absolutely minimal example.
thanks,
*-pike