Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
epub_viewer
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
epub_viewer
Commits
95046bfc
Commit
95046bfc
authored
1 year ago
by
Andrii Sus
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3369333
by snap_x: Drupal 10 Compatibility
parent
f23b46cf
No related branches found
No related tags found
1 merge request
!2
Issue #3369333 by snap_x: Drupal 10 Compatibility
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
epub_module.info.yml
+1
-2
1 addition, 2 deletions
epub_module.info.yml
src/Controller/EpubController.php
+2
-2
2 additions, 2 deletions
src/Controller/EpubController.php
with
3 additions
and
4 deletions
epub_module.info.yml
+
1
−
2
View file @
95046bfc
name
:
Epub Viewer
type
:
module
description
:
'
Field
formatter
to
generate
link
and
read
Epub
file
on
browser.'
core
:
8.x
core_version_requirement
:
^8 || ^9
core_version_requirement
:
^9.3 || ^10
This diff is collapsed.
Click to expand it.
src/Controller/EpubController.php
+
2
−
2
View file @
95046bfc
...
...
@@ -21,7 +21,7 @@ class EpubController {
// Loading file from file ID.
$file
=
File
::
load
(
$fid
);
$file_uri
=
$file
->
getFileUri
();
$file_url
=
Url
::
fromUri
(
file_create_url
(
$file_uri
));
$file_url
=
Url
::
fromUri
(
\Drupal
::
service
(
'file_url_generator'
)
->
generateAbsoluteString
(
$file_uri
));
$data
[
'file_path'
]
=
$file_url
->
getUri
();
$data
[
'base_url'
]
=
$base_url
;
$config
=
\Drupal
::
config
(
'epub_module.epubsettings'
);
...
...
@@ -31,7 +31,7 @@ class EpubController {
'font_color'
=>
$config
->
get
(
'font_color'
),
'show_download_icon'
=>
$config
->
get
(
'show_download_icon'
),
];
$module_path
=
d
rupal
_get_path
(
'module'
,
'epub_module'
);
$module_path
=
\D
rupal
::
service
(
'extension.list.module'
)
->
getPath
(
'epub_module'
);
$data
[
'module_path'
]
=
$base_url
.
'/'
.
$module_path
;
$build
=
[
'#theme'
=>
'epub_view'
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment