You are here

simple_megamenu_example.module in Simple Mega Menu 8

Same filename and directory in other branches
  1. 2.0.x modules/simple_megamenu_example/simple_megamenu_example.module

File

modules/simple_megamenu_example/simple_megamenu_example.module
View source
<?php

/**
 * @file
 * Contains simple_megamenu_example.module.
 */
use Drupal\Core\Routing\RouteMatchInterface;

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

    // Main module help for the simple_megamenu module.
    case 'help.page.simple_megamenu_example':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('Provide a Megamenu entity type as a starting kit / example.') . '</p>';
      return $output;
    default:
  }
}

/**
 * Implements hook_theme().
 */
function simple_megamenu_example_theme() {
  $theme = [];
  $theme['simple_mega_menu__megamenu'] = [
    'render element' => 'elements',
    'base hook' => 'simple_mega_menu',
  ];
  return $theme;
}

Functions