1 node.module node_layout_context_info()

Implements hook_layout_context_info().

File

core/modules/node/node.module, line 1663
The core module that allows content to be submitted to the site.

Code

function node_layout_context_info() {
  $info['node'] = array(
    'title' => t('Content (node)'),
    // Define the class which is used to handle this context.
    'class' => 'EntityLayoutContext',
    // Define menu paths where the node ID is a "known" context.
    'menu paths' => array(
      'node/%node',
      'node/%node/view',
      'node/%node/edit',
    ),
    // Given the menu paths defined above, identify the part of the path that
    // is needed to generate this context.
    'path placeholder' => '%node',
    // Given an argument, define the callback that will be responsible for
    // loading the main context data.
    'load callback' => 'node_load',
  );
  return $info;
}