You are here

lightgallery.module in Lightgallery 8

Same filename and directory in other branches
  1. 7 lightgallery.module

Light Gallery module file.

File

lightgallery.module
View source
<?php

/**
 * @file
 * Light Gallery module file.
 */
use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Holds hooks and general functionality.
 */

/**
 * Implements hook_help().
 */
function lightgallery_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.lightgallery':
      $output = file_get_contents(drupal_get_path('module', 'lightgallery') . '/README.md');
      return '<pre>' . $output . '</pre>';
  }
}

/**
 * Implements hook_theme().
 */
function lightgallery_theme() {
  return [
    'lightgallery' => [
      'variables' => [
        'items' => [],
        'id' => NULL,
      ],
      'template' => 'lightgallery',
    ],
  ];
}

Functions

Namesort descending Description
lightgallery_help Implements hook_help().
lightgallery_theme Implements hook_theme().