You are here

function search_api_saved_searches_rules_action_info in Search API Saved Searches 7

Implements hook_rules_action_info().

File

./search_api_saved_searches.rules.inc, line 11
Rules integration for the Search API Saved Searches module.

Code

function search_api_saved_searches_rules_action_info() {
  return array(
    'search_api_saved_searches_rules_index_results' => array(
      'label' => t('Fetch the saved searches'),
      'parameter' => array(
        'index_id' => array(
          'type' => 'integer',
          'label' => t('Index for which to retrieve searches'),
          'description' => t('Select the search index for which saved searches should be retrieved.'),
          'options list' => '_search_api_saved_searches_settings_options_list',
        ),
      ),
      'provides' => array(
        'search_api_saved_search' => array(
          'type' => 'list<integer>',
          'label' => t('List of the IDs of the saved searches that require executing.'),
        ),
      ),
      'group' => t('Search API Saved Searches'),
    ),
    'search_api_saved_searches_rules_get_saved_search_new_items' => array(
      'label' => t('Fetch the new results for a saved search'),
      'parameter' => array(
        'index_id' => array(
          'type' => 'integer',
          'label' => t('Saved search ID'),
          'description' => t('The ID of the saved search for which to retrieve new results.'),
        ),
      ),
      'provides' => array(
        'search' => array(
          'type' => 'search_api_saved_search',
          'label' => t('The executed search.'),
        ),
        'result_count' => array(
          'type' => 'integer',
          'label' => t('The count of results that were found.'),
        ),
        'results' => array(
          'type' => 'list<integer>',
          'label' => t('The list of new results for the saved search since it was last executed.'),
        ),
      ),
      'group' => t('Search API Saved Searches'),
    ),
  );
}