1 contextual_links_example.module contextual_links_example_theme()

Implements hook_theme().

See also

template_preprocess_contextual_links_example_object()

Related topics

File

modules/examples/contextual_links_example/contextual_links_example.module, line 271
Hooks implementations for the Contextual Links Example module.

Code

function contextual_links_example_theme() {
  // The core Contextual Links module imposes two restrictions on how an object
  // must be themed in order for it to display the object's contextual links in
  // the user interface:
  // - The object must use a template file rather than a theme function. See
  //   contextual-links-example-object.tpl.php for more information on how the
  //   template file should be structured.
  // - The first variable passed to the template must be a renderable array. In
  //   this case, we accomplish that via the most common method, by passing a
  //   single renderable element.
  return array(
    'contextual_links_example_object' => array(
      'template' => 'contextual-links-example-object',
      'render element' => 'element',
    ),
  );
}