You are here

image_popup.module in Simple Image Popup 2.x

Same filename and directory in other branches
  1. 8 image_popup.module

File

image_popup.module
View source
<?php

use Drupal\Core\Routing\RouteMatchInterface;

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

    // Main module help for the image_popup module.
    case 'help.page.image_popup':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('This module gives the popup field formatter for the image field types.') . '</p>';
      return $output;
    default:
  }
}

/**
 * Implements hook_theme().
 */
function image_popup_theme($existing, $type, $theme, $path) {
  return [
    'image_popup_details' => [
      'variables' => [
        'url_popup' => NULL,
      ],
      'path' => $path . '/templates',
      'template' => 'image-popup-formatter',
    ],
  ];
}
function image_popup_ckeditor_plugin_info_alter(array &$plugins) {
  $plugins['imagepopup'] = [
    'id' => 'imagepopup',
    'label' => t('Insert image popup'),
    'module' => 'image_popup',
    'class' => 'Drupal\\image_popup\\Plugin\\CKEditorPlugin\\ImagePopup',
    'provider' => 'image_popup',
  ];
}