function search_extra_type_search_execute

Implements hook_search_execute().

This is a dummy search, so when search "executes", we just return a dummy result containing the keywords and a list of conditions.

File

modules/search/tests/search_extra_type.module, line 37

Code

function search_extra_type_search_execute($keys = NULL, $conditions = NULL) {
    if (!$keys) {
        $keys = '';
    }
    return array(
        array(
            'link' => url('node'),
            'type' => 'Dummy result type',
            'title' => 'Dummy title',
            'snippet' => "Dummy search snippet to display. Keywords: {$keys}\n\nConditions: " . print_r($conditions, TRUE),
        ),
    );
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.