-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocumentation_export.module
More file actions
49 lines (45 loc) · 1.59 KB
/
documentation_export.module
File metadata and controls
49 lines (45 loc) · 1.59 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
49
<?php
/**
* @file
* This module provide an interface that summarize entities types on the site.
*/
use Drupal\Core\Url;
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function documentation_export_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.documentation_export':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('This module provide an administration page that display a summary of the ConfigEntityType (like node types, paragraphs types, media types, etc) and their fields.') . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<p>' . t('It can be used to help create a technical documentation of the website, navigate faster between entities and fields, and help to understand which entities types are present on the site.') . '</p>';
$output .= '<h3>' . t('Configuration') . '</h3>';
$output .= '<p>' . t('<a href=":actions">The configuration page of the module</a> is used to set which entities can be displayed in the documentation page.',
[
':actions' => Url::fromRoute('documentation_export.configuration')
->toString(),
]) . '</p>';
return $output;
}
}
/**
* Implements hook_theme().
*/
function documentation_export_theme($existing, $type, $theme, $path) {
return [
'documentation_page' => [
'variables' => [
'data' => NULL,
],
],
'pdf_export_page' => [
'variables' => [
'data' => NULL,
'stylesheet' => NULL,
],
],
];
}