function theming_example_theme

Same name in other branches
  1. 3.x modules/theming_example/theming_example.module \theming_example_theme()
  2. 4.0.x modules/theming_example/theming_example.module \theming_example_theme()

Implements hook_theme().

Defines the theming capabilities provided by this module.

Related topics

File

theming_example/theming_example.module, line 111

Code

function theming_example_theme($existing, $type, $theme, $path) {
    return array(
        'theming_example_content_array' => array(
            // We use 'render element' when the item to be passed is a self-describing
            // render array (it will have #theme_wrappers)
'render element' => 'element',
        ),
        'theming_example_list' => array(
            // We use 'variables' when the item to be passed is an array whose
            // structure must be described here.
'variables' => array(
                'title' => NULL,
                'items' => NULL,
            ),
        ),
        'theming_example_select_form' => array(
            'render element' => 'form',
        ),
        'theming_example_text_form' => array(
            'render element' => 'form',
            // In this one the rendering will be done by a template file
            // (theming-example-text-form.tpl.php) instead of being rendered by a
            // function. Note the use of dashes to separate words in place of
            // underscores. The template file's extension is also left out so that
            // it may be determined automatically depending on the template engine
            // the site is using.
'template' => 'theming-example-text-form',
        ),
    );
}