function search_by_page_block_view in Search by Page 8
Same name and namespace in other branches
- 7 search_by_page.module \search_by_page_block_view()
Implements hook_block_view().
File
- ./
search_by_page.module, line 875 - Main module file for Drupal module Search by Page.
Code
function search_by_page_block_view($delta = 0) {
$blocktitle = search_by_page_setting_get('block_title', $delta, t('Search'));
if (\Drupal::moduleHandler()
->moduleExists('i18n_string')) {
$blocktitle = i18n_string_translate('search_by_page:search_form:block_title' . $delta, $blocktitle);
}
return [
'subject' => $blocktitle,
'content' => \Drupal::formBuilder()
->getForm('search_by_page_form', $delta, NULL, TRUE),
];
}