Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
WCMS
uw_ct_contact
Commits
96ea13bd
Commit
96ea13bd
authored
Feb 04, 2022
by
Chris Shantz
Browse files
Merge branch '1.0.x' into prod/1.0.x
parents
e5c66a58
c7aec06b
Changes
1
Hide whitespace changes
Inline
Side-by-side
uw_ct_contact.install
View file @
96ea13bd
...
...
@@ -154,11 +154,17 @@ function uw_ct_contact_update_9101(&$sandbox) {
$configUpdate
->
import
(
'field_storage_config'
,
'node.field_uw_contact_listing_image'
);
$configUpdate
->
import
(
'field_config'
,
'node.uw_ct_contact.field_uw_contact_listing_image'
);
// We need to flush all caches so that the new field
// takes place, if we do not do this, then all the code
// below fails, as Drupal does not know about the new
// field that we just added above.
drupal_flush_all_caches
();
// Get all the nids of contact.
$nids
=
\
Drupal
::
entityQuery
(
'node'
)
->
condition
(
'type'
,
'uw_ct_contact'
)
->
execute
();
$nids
=
\
Drupal
::
entityQuery
(
'node'
)
->
condition
(
'type'
,
'uw_ct_contact'
)
->
execute
();
// Get all the contact nodes.
$nodes
=
\
Drupal\node\Entity\
Node
::
loadMultiple
(
$nids
);
$nodes
=
Node
::
loadMultiple
(
$nids
);
// Step through each of the contact node and set the listing image
// to the portrait image. We can just blindly do this, as if there
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment