You are here

floating_menu.module in Floating Menu 8

This is the main module file for Floating Menu.

File

floating_menu.module
View source
<?php

/**
 * @file
 * This is the main module file for Floating Menu.
 */
use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Implements hook_theme().
 */
function floating_menu_theme($existing, $type, $theme, $path) {
  return [
    'floating_menu_block' => [
      'variables' => [
        'menu_items' => NULL,
      ],
    ],
  ];
}

/**
 * Implements hook_help().
 */
function floating_menu_help($route_name, $route_match) {
  switch ($route_name) {
    case 'help.page.floating_menu':
      $path = drupal_get_path('module', 'floating_menu');
      $output = file_get_contents($path . '/README.txt');
      $output = str_replace("\n", '<br>', $output);
      return $output;
  }
}

Functions

Namesort descending Description
floating_menu_help Implements hook_help().
floating_menu_theme Implements hook_theme().