Posted By

kfiil on 05/18/11


Tagged

template drupal drupal6


Versions (?)

hook_theme implementation with description


 / Published in: PHP
 

hook_theme implementation with description

  1. /**
  2.  * Implementation of hook_theme()
  3.  *
  4.  * Register a module (or theme's) theme implementations.
  5.  * Modules and themes implementing this return an array of arrays.
  6.  * @link http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hook_theme/6 Drupal API Description
  7.  * @param $existing An array of existing implementations that may be used for override purposes. This is primarily useful for themes that may wish to examine existing implementations to extract data (such as arguments) so that it may properly register its own, higher priority implementations.
  8.  * @param $type What 'type' is being processed. This is primarily useful so that themes tell if they are the actual theme being called or a parent theme. May be one of:
  9.  * module: A module is being checked for theme implementations.
  10.  * base_theme_engine: A theme engine is being checked for a theme which is a parent of the actual theme being used.
  11.  * theme_engine: A theme engine is being checked for the actual theme being used.
  12.  * base_theme: A base theme is being checked for theme implementations.
  13.  * theme: The actual theme in use is being checked.
  14.  * @param $theme The actual name of theme that is being being checked (mostly only useful for theme engine).
  15.  * @param $path The directory path of the theme or module, so that it doesn't need to be looked up.
  16.  * @return array A keyed array of theme hooks.
  17.  */
  18. function hook_theme($existing, $type, $theme, $path)
  19. {
  20. return array(
  21. 'menu' => array(
  22. 'arguments' => array('links' => ''),
  23. ),
  24. );
  25. }

Report this snippet  

You need to login to post a comment.