-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnormalized_image_styles.module
More file actions
48 lines (45 loc) · 2.16 KB
/
normalized_image_styles.module
File metadata and controls
48 lines (45 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
* @file
* Provides sets of aspect ratio based image styles with normalized dimensions.
*/
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Url;
/**
* Implements hook_help().
*/
function normalized_image_styles_help(
$route_name,
RouteMatchInterface $route_match
) {
switch ($route_name) {
case "help.page.normalized_image_styles":
$output = "<h3>" . t("About") . "</h3>";
$output .= "<p>" . t("The Normalized Image Styles module provides several sets of aspect ratio
based image styles with normalized dimensions. These sets of image styles can be used by the core
Responsive Image module.") . "</p>";
$output .= "<h3>" . t("Uses") . "</h3>";
$output .= "<dl>";
$output .= "<dt>" . t("Enabling Normalized Image Styles") . "</dt>";
$output .= "<dd>" . t('Normalized Image Styles can be enabled for multiple aspect ratios on the
module <a href=":module">Extend page</a>. Style sets are listed in descending order from widest to
narrowest aspect ratio.',
[":module" => Url::fromRoute("system.modules_list")->toString()]) . "</dd>";
$output .= "<dt>" . t("Importing Normalized Image Styles") . "</dt>";
$output .= "<dd>" . t('Once enabled, Normalized Image Styles can be imported or rolled back on the
<a href=":migrate">Migrations page</a>, or on the command line using Drush (<em>drush mim --tag
normalized</em> to import all enabled styles).',
[":migrate" => Url::fromRoute("entity.migration_group.list")->toString()]) . "</dd>";
$output .= "<dt>" . t("Uninstalling Normalized Image Styles") . "</dt>";
$output .= "<dd>" . t('Once imported, Normalized Image Styles and all of its sub-modules can
safely be uninstalled on the module <a href=":uninstall">Uninstall page</a>. The generated image
style configuration will persist and can be managed on the configuration
<a href=":sync">Synchronize page</a>.',
[
":uninstall" => Url::fromRoute("system.modules_uninstall")->toString(),
":sync" => Url::fromRoute("config.sync")->toString(),
]) . "</dd>";
$output .= "</dl>";
return $output;
}
}