Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_cfg_common
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_cfg_common
Merge requests
!215
ISTWCMS-5176: Updating homepage check function.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
ISTWCMS-5176: Updating homepage check function.
feature/ISTWCMS-5176-ibiki-uwservice
into
1.0.x
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Igor Biki
requested to merge
feature/ISTWCMS-5176-ibiki-uwservice
into
1.0.x
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
1.0.x
1.0.x (base)
and
latest version
latest version
c82ed658
1 commit,
3 years ago
1 file
+
2
−
1
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/Service/UWService.php
+
2
−
1
Options
@@ -503,8 +503,9 @@ class UWService implements UWServiceInterface {
@@ -503,8 +503,9 @@ class UWService implements UWServiceInterface {
*/
*/
public
static
function
nodeIsHomePage
(
int
$nid
):
bool
{
public
static
function
nodeIsHomePage
(
int
$nid
):
bool
{
$front_page_path
=
\Drupal
::
configFactory
()
->
get
(
'system.site'
)
->
get
(
'page.front'
);
$front_page_path
=
\Drupal
::
configFactory
()
->
get
(
'system.site'
)
->
get
(
'page.front'
);
$front_page_alias
=
\Drupal
::
service
(
'path_alias.manager'
)
->
getAliasByPath
(
$front_page_path
);
$node_alias
=
\Drupal
::
service
(
'path_alias.manager'
)
->
getAliasByPath
(
'/node/'
.
$nid
);
$node_alias
=
\Drupal
::
service
(
'path_alias.manager'
)
->
getAliasByPath
(
'/node/'
.
$nid
);
return
$front_page_
path
===
$node_alias
;
return
$front_page_
alias
===
$node_alias
;
}
}
/**
/**
Loading