function hook_contextual_links_view_alter

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 contextual.api.php hook_contextual_links_view_alter(&$element, $items)
cle7 contextual.api.php hook_contextual_links_view_alter(&$element, $items)
elmsmedia7 contextual.api.php hook_contextual_links_view_alter(&$element, $items)
icor7 contextual.api.php hook_contextual_links_view_alter(&$element, $items)
meedjum_blog7 contextual.api.php hook_contextual_links_view_alter(&$element, $items)
mooc7 contextual.api.php hook_contextual_links_view_alter(&$element, $items)

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.

Parameters

$element: A renderable array representing the contextual links.

$items: An associative array containing the original contextual link items, as generated by menu_contextual_links(), which were used to build $element['#links'].

See also

hook_menu_contextual_links_alter()

contextual_pre_render_links()

contextual_element_info()

Related topics

3 functions implement hook_contextual_links_view_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

ds_contextual_links_view_alter in sites/all/modules/ulmus/ds/ds.module
Implements hook_contextual_links_view_alter().
views_contextual_links_view_alter in sites/all/modules/ulmus/views/views.module
Implements hook_contextual_links_view_alter().
views_ui_contextual_links_view_alter in sites/all/modules/ulmus/views/views_ui.module
Implements hook_contextual_links_view_alter().
1 invocation of hook_contextual_links_view_alter()
contextual_pre_render_links in modules/contextual/contextual.module
Build a renderable array for contextual links.

File

modules/contextual/contextual.api.php, line 32
Hooks provided by Contextual module.

Code

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';
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.