You are here

function search_by_page_block_info in Search by Page 7

Same name and namespace in other branches
  1. 8 search_by_page.module \search_by_page_block_info()

Implements hook_block_info().

File

./search_by_page.module, line 1062
Main module file for Drupal module Search by Page.

Code

function search_by_page_block_info() {
  $ret = array();

  // Create one block per environment
  $envs = search_by_page_list_environments();
  foreach ($envs as $envid) {
    $envname = search_by_page_setting_get('environment_name', $envid, t('new'));
    if (module_exists('i18n_string')) {
      $envname = i18n_string_translate('search_by_page:environment:name' . $envid, $envname);
    }
    $ret[$envid] = array(
      'info' => t('Search by page @environment', array(
        '@environment' => $envname,
      )),
      'cache' => DRUPAL_NO_CACHE,
    );
  }
  return $ret;
}