1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- /**
- * @file
- * Contains edlp_search.module.
- */
- use Drupal\Core\Routing\RouteMatchInterface;
- use Drupal\Core\Url;
- /**
- * Implements hook_help().
- */
- function edlp_search_help($route_name, RouteMatchInterface $route_match) {
- switch ($route_name) {
- // Main module help for the edlp_search module.
- case 'help.page.edlp_search':
- $output = '';
- $output .= '<h3>' . t('About') . '</h3>';
- $output .= '<p>' . t('Edlp search module') . '</p>';
- 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_searchResults_ajax', [], ['absolute' => TRUE]);
- $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,
- ),
- ),
- );
- }
|