You are here

function contextual_links_example_object_page in Examples for Developers 7

Menu callback; displays an object defined by this module on its own page.

See also

contextual_links_overview_page()

Related topics

1 string reference to 'contextual_links_example_object_page'
contextual_links_example_menu in contextual_links_example/contextual_links_example.module
Implements hook_menu().

File

contextual_links_example/contextual_links_example.module, line 309
Shows how to use Drupal's contextual links functionality.

Code

function contextual_links_example_object_page($object) {

  // Here we render the object but without the #contextual_links property,
  // since we don't want contextual links to appear when the object is already
  // being displayed on its own page.
  $build = array(
    '#theme' => 'contextual_links_example_object',
    '#object' => $object,
  );
  return $build;
}