function page_manager_theme in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 page_manager/page_manager.module \page_manager_theme()
File
- page_manager/
page_manager.module, line 164 - The page manager module provides a UI and API to manage pages.
Code
function page_manager_theme() {
// For some reason, some things can activate modules without satisfying
// dependencies. I don't know how, but this helps prevent things from
// whitescreening when this happens.
if (!module_exists('ctools')) {
return;
}
$base = array(
'path' => drupal_get_path('module', 'page_manager') . '/theme',
'file' => 'page_manager.theme.inc',
);
$items = array(
'page_manager_list_pages_form' => array(
'arguments' => array(
'form' => NULL,
),
) + $base,
'page_manager_handler_rearrange' => array(
'arguments' => array(
'form' => NULL,
),
) + $base,
'page_manager_edit_page' => array(
'template' => 'page-manager-edit-page',
'arguments' => array(
'page' => NULL,
'save' => NULL,
'operations' => array(),
'content' => array(),
),
) + $base,
'page_manager_lock' => array(
'arguments' => array(
'page' => array(),
),
) + $base,
'page_manager_changed' => array(
'arguments' => array(
'text' => NULL,
'description' => NULL,
),
) + $base,
);
// Allow task plugins to have theme registrations by passing through:
$tasks = page_manager_get_tasks();
// Provide menu items for each task.
foreach ($tasks as $task_id => $task) {
if ($function = ctools_plugin_get_function($task, 'hook theme')) {
$function($items, $task);
}
}
return $items;
}