Commit 96ea13bd authored by Chris Shantz's avatar Chris Shantz
Browse files

Merge branch '1.0.x' into prod/1.0.x

parents e5c66a58 c7aec06b
......@@ -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.
// 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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment