function 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 209

Code

function page_manager_search_build_subtask($task, $module) {
    $search_info = search_get_info();
    $info = $search_info[$module];
    $path = 'search/' . $info['path'];
    $subtask = array(
        'name' => $module,
        'admin title' => $info['title'],
        'admin path' => "{$path}/!keywords",
        'admin description' => t('Search @type', array(
            '@type' => $info['title'],
        )),
        '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_' . $module, TRUE),
        // This works for both enable AND disable.
'enable callback' => 'page_manager_search_enable',
    );
    return $subtask;
}