View source
<?php
use Drupal\Core\Routing\RouteMatchInterface;
function image_popup_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
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:
}
}
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',
];
}