You are here

function page_manager_get_operation_content in Chaos Tool Suite (ctools) 7

Same name and namespace in other branches
  1. 6 page_manager/page_manager.admin.inc \page_manager_get_operation_content()

Fetch the content for an operation.

First, this drills down through the arguments to find the operation, and turns whatever it finds into the active trail which is then used to hilite where we are when rendering the operation list.

The arguments are discovered from the URL, and are an exact match for where the operation is in the hierarchy. For example, handlers/foo/settings will be the operation to edit the settings for the handler named foo. This comes in as an array ('handlers', 'foo', 'settings') and is used to find where the data for that operation is in the array.

2 calls to page_manager_get_operation_content()
page_manager_edit_page in page_manager/page_manager.admin.inc
Render the edit page for a a page, custom or system.
page_manager_edit_page_operation in page_manager/page_manager.admin.inc
Entry point to edit a single operation for a page.

File

page_manager/page_manager.admin.inc, line 832
Administrative functions for the page manager.

Code

function page_manager_get_operation_content($js, &$page, $trail, $operations) {
  list($operation, $active, $args, $titles) = page_manager_get_operation($operations, $trail);

  // Once we've found the operation, send it off to render.
  if ($operation) {
    $content = _page_manager_get_operation_content($js, $page, $active, $operation, $titles, $args);
  }
  if (empty($content)) {
    $content = _page_manager_get_operation_content($js, $page, array(
      'summary',
    ), $operations['summary']);
  }
  return $content;
}