Demonstrate how render arrays are arranged and how they can be altered. This alters blocks and the page to show the actual render array that is being used to create each item.
See also
drupal_render()
Functions & methods
| Name | Description |
|---|---|
| render_example_add_hr | This #post_render function gets to alter the rendered output after all theme functions have acted on it, and it receives the original data, so can make decisions based on that. In this example, no use is made of the passed-in $element. |
| render_example_add_prefix | A '#post_render' function to add a little markup onto the end markup. |
| render_example_add_suffix | A '#pre_render' function. |
| render_example_arrays | Provides a number of render arrays and show what they do. |
| render_example_cache_expensive | A potentially expensive function. |
| render_example_cache_pre_render | A '#pre_render' function. |
| render_example_change_to_ol | Adds a #type to the element before it gets rendered. In this case, changes from the default 'ul' to 'ol'. |
| render_example_demo_form | Builds the form that offers options of what items to show. |
| render_example_embedded_form | Utility function to build a named form given a set of form elements. |
| render_example_info | Simple basic information about the module; an entry point. |
| render_example_menu | Implements hook_menu(). |
| render_example_page_alter | Implements hook_page_alter(). |
| render_example_theme | Implements hook_theme(). |
| theme_render_array | Themes the render array (from the demonstration page). |
| theme_render_example_add_div | Wraps a div around the already-rendered #children. |
| theme_render_example_add_notes | Wraps a div and add a little text after the rendered #children. |
| theme_render_example_aggregate | A #theme function. |
File
- render_example/
render_example.module, line 8 - Demonstrates render arrays.