function page_manager_search_build_subtask in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 page_manager/plugins/tasks/search.inc \page_manager_search_build_subtask()
Build a subtask array for a given page.
2 calls to page_manager_search_build_subtask()
- page_manager_search_subtask in page_manager/
plugins/ tasks/ search.inc - Callback to return a single subtask.
- page_manager_search_subtasks in page_manager/
plugins/ tasks/ search.inc - Task callback to get all subtasks.
File
- page_manager/
plugins/ tasks/ search.inc, line 274 - Handle the 'node view' override task.
Code
function page_manager_search_build_subtask($task, $name) {
$type = module_invoke($name, 'search', 'name', TRUE);
$subtask = array(
'name' => $name,
'admin title' => $type,
'admin path' => "search/{$name}/!keywords",
'admin description' => t('Search @type', array(
'@type' => $type,
)),
'admin type' => t('System'),
'row class' => empty($page->disabled) ? 'page-manager-enabled' : 'page-manager-disabled',
'storage' => t('In code'),
'disabled' => variable_get('page_manager_search_disabled_' . $name, TRUE),
// This works for both enable AND disable
'enable callback' => 'page_manager_search_enable',
);
return $subtask;
}