Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
library_generator
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
library_generator
Merge requests
!6
added hook_help
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
added hook_help
issue/library_generator-3372515:3372515-hook-help-missing
into
1.x
Overview
0
Commits
1
Pipelines
0
Changes
1
Closed
Priya Degwekar
requested to merge
issue/library_generator-3372515:3372515-hook-help-missing
into
1.x
1 year ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
Closes
#3372515
0
0
Merge request reports
Compare
1.x
1.x (base)
and
latest version
latest version
079bb0b8
1 commit,
1 year ago
1 file
+
27
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
library_generator.module
+
27
−
0
Options
<?php
use
Drupal\Core\Routing\RouteMatchInterface
;
use
Drupal\Core\Url
;
/**
* @file
* The library_generator module file.
@@ -12,3 +15,27 @@ function library_generator_library_info_alter(&$libraries, $extension) {
$generated_libraries
=
\Drupal
::
service
(
'library_generator.discovery'
)
->
getLibrariesByExtension
(
$extension
);
$libraries
=
array_merge
(
$generated_libraries
,
$libraries
);
}
/**
* Implements hook_help().
*/
function
library_generator_help
(
$route_name
,
RouteMatchInterface
$route_match
)
{
switch
(
$route_name
)
{
case
'help.page.library_generator'
:
$output
=
''
;
$output
.
=
'<h3>'
.
t
(
'About'
)
.
'</h3>'
;
$output
.
=
'<p>'
.
t
(
'The Library Generator module generates asset libraries for CSS and JS files in modules and themes, see the <a href=":handbook">
online documentation for the Custom Account Link module</a>.'
,
[
':library_generator'
=>
Url
::
fromRoute
(
'help.page'
,
[
'name'
=>
'library_generator'
])
->
toString
(),
':handbook'
=>
'https://www.drupal.org/project/library_generator'
]
)
.
'</p>'
;
$output
.
=
'<h3>'
.
t
(
'Uses'
)
.
'</h3>'
;
$output
.
=
'<p>'
.
t
(
' This module is used when you want a separate asset library for each CSS and JS file without having to add them manually to your *.libraries.yml'
);
$output
.
=
'</p>'
;
return
$output
;
}
}
\ No newline at end of file
Loading