' . t('About') . ''; $output .= '
' . t('Edlp search module') . '
'; return $output; default: } } /** * Implements hook_page_attachments(). * @param array $attachments */ function edlp_search_page_attachments(array &$attachments) { $attachments['#attached']['library'][] = 'edlp_search/edlp_search-library'; $url = Url::fromRoute('edlp_search.edlp_search_controller_search_results_ajax'); $attachments['#attached']['drupalSettings']['edlp_search']['results_ajax_url'] = $url->getInternalPath(); } /** * Implements hook_theme(). */ function edlp_search_theme($existing, $type, $theme, $path) { return array( 'edlp_search_search_form' => array( 'file' => 'includes/edlp_search_search_form.inc', 'variables' => array( 'form' => null, ), ), 'edlp_search_results' => array( 'file' => 'includes/edlp_search_results.inc', 'variables' => array( 'items' => null, 'no_results_found' => '', 'search_help' => '' ), ), ); }