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
Commits
d45b5b51
Commit
d45b5b51
authored
3 years ago
by
Eric Bremner
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-5234: udpating terminology from hero to media
parent
36f06348
No related branches found
No related tags found
1 merge request
!184
Feature/istwcms 5234 ebremner hero
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Service/UWService.php
+6
-7
6 additions, 7 deletions
src/Service/UWService.php
src/Service/UWServiceInterface.php
+1
-1
1 addition, 1 deletion
src/Service/UWServiceInterface.php
src/Service/UwNodeContent.php
+3
-3
3 additions, 3 deletions
src/Service/UwNodeContent.php
with
10 additions
and
11 deletions
src/Service/UWService.php
+
6
−
7
View file @
d45b5b51
...
...
@@ -220,12 +220,11 @@ class UWService implements UWServiceInterface {
];
break
;
case
'
hero
'
:
case
'
media
'
:
$preprocess
=
[
'uw_ct_blog'
,
'uw_ct_event'
,
'uw_ct_news_item'
,
'uw_ct_web_page'
,
];
break
;
}
...
...
@@ -236,18 +235,18 @@ class UWService implements UWServiceInterface {
/**
* {@inheritDoc}
*/
public
function
uwCheckNodeFor
Hero
(
Node
$node
):
string
{
public
function
uwCheckNodeFor
Media
(
Node
$node
):
string
{
// Set the node type.
$node_type
=
$node
->
getType
();
// Get the list of content types that are allowed to have
// hero from our service.
$
hero
=
$this
->
uwGetNodePreprocessing
(
'
hero
'
);
$
media
=
$this
->
uwGetNodePreprocessing
(
'
media
'
);
// If node is allowed to have a
hero
, make sure that
// node actually has a
hero
.
if
(
in_array
(
$node_type
,
$
hero
))
{
// If node is allowed to have a
media
, make sure that
// node actually has a
media
.
if
(
in_array
(
$node_type
,
$
media
))
{
// Get the type of media value from the node.
$value
=
$node
->
field_uw_type_of_media
->
value
;
...
...
This diff is collapsed.
Click to expand it.
src/Service/UWServiceInterface.php
+
1
−
1
View file @
d45b5b51
...
...
@@ -68,7 +68,7 @@ interface UWServiceInterface {
* @return string
* Yes or no.
*/
public
function
uwCheckNodeFor
Hero
(
Node
$node
):
string
;
public
function
uwCheckNodeFor
Media
(
Node
$node
):
string
;
/**
* A function to get or check the attached sidebar.
...
...
This diff is collapsed.
Click to expand it.
src/Service/UwNodeContent.php
+
3
−
3
View file @
d45b5b51
...
...
@@ -240,9 +240,9 @@ class UwNodeContent {
$content_data
[
'header'
][
'author'
]
=
$this
->
addToContentData
(
'author'
,
'field_author'
);
}
// Get the
hero image
.
if
(
$node_flags
[
'get_
hero
'
])
{
$content_data
[
'
hero_image
'
]
=
$this
->
addToContentData
(
'
sources'
,
'field_uw_hero_image'
);
// Get the
media
.
if
(
$node_flags
[
'get_
media
'
])
{
$content_data
[
'
media
'
]
=
$this
->
addToContentData
(
'
media'
,
NULL
);
}
// Get the listing image.
...
...
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