You are here

geocoder.module in Geocoder 8.2

Geocoder Module.

File

geocoder.module
View source
<?php

/**
 * @file
 * Geocoder Module.
 */
use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Implements hook_theme().
 */
function geocoder_theme($existing, $type, $theme, $path) {
  return [
    'geocoder_help' => [
      'template' => 'help',
    ],
  ];
}

/**
 * Implements hook_help().
 */
function geocoder_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {

    // Main module help for the geocoder module.
    case 'help.page.geocoder':
      $element = [
        '#theme' => 'geocoder_help',
      ];
      return \Drupal::service('renderer')
        ->render($element);
    default:
      return '';
  }
}

Functions

Namesort descending Description
geocoder_help Implements hook_help().
geocoder_theme Implements hook_theme().