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
12
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
35145194
Commit
35145194
authored
4 months ago
by
Eric Bremner
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-7035: add code to zero out any banners when the type of media is set to none
parent
9080f1fd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
uw_cfg_common.module
+9
-0
9 additions, 0 deletions
uw_cfg_common.module
with
9 additions
and
0 deletions
uw_cfg_common.module
+
9
−
0
View file @
35145194
...
...
@@ -116,6 +116,15 @@ function uw_cfg_common_entity_presave(EntityInterface $entity) {
}
}
}
// If there is a type of media, check if it is set
// to none and if it is then zero out any banners
// that were added.
if
(
$entity
->
hasField
(
'field_uw_type_of_media'
))
{
if
(
!
$entity
->
field_uw_type_of_media
->
value
)
{
$entity
->
set
(
'field_uw_banner'
,
NULL
);
}
}
}
}
...
...
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