diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-09-11 14:35:13 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-09-11 14:35:13 +0000 |
commit | 84e5d10b66a19211fea8792816bfafc65a446478 (patch) | |
tree | ee514d05f0a5dbb7ca452fd581ae90d546cc45a4 /modules/contextual/contextual.api.php | |
parent | 452e31f62924d35b71576aa8291812014a80561e (diff) | |
download | brdo-84e5d10b66a19211fea8792816bfafc65a446478.tar.gz brdo-84e5d10b66a19211fea8792816bfafc65a446478.tar.bz2 |
- Patch #627288 by sun, David_Rothstein: contextual links are not alterable.
Diffstat (limited to 'modules/contextual/contextual.api.php')
-rw-r--r-- | modules/contextual/contextual.api.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/modules/contextual/contextual.api.php b/modules/contextual/contextual.api.php new file mode 100644 index 000000000..e445bbcac --- /dev/null +++ b/modules/contextual/contextual.api.php @@ -0,0 +1,41 @@ +<?php +// $Id$ + +/** + * @file + * Hooks provided by Contextual module. + */ + +/** + * @addtogroup hooks + * @{ + */ + +/** + * Alter a contextual links element before it is rendered. + * + * This hook is invoked by contextual_pre_render_links(). The renderable array + * of #type 'contextual_links', containing the entire contextual links data that + * is passed in by reference. Further links may be added or existing links can + * be altered. + * + * @param $element + * A renderable array representing the contextual links. + * @param $items + * An associative array containing the original contextual link items, as + * generated by menu_contextual_links(), which were used to build + * $element['#links']. + * + * @see hook_menu_contextual_links_alter() + * @see contextual_pre_render_links() + * @see contextual_element_info() + */ +function hook_contextual_links_view_alter(&$element, $items) { + // Add another class to all contextual link lists to facilitate custom + // styling. + $element['#attributes']['class'][] = 'custom-class'; +} + +/** + * @} End of "addtogroup hooks". + */ |