Commit 9a76b51b authored by Josh Fabean's avatar Josh Fabean
Browse files

Issue #3300245 by josh.fabean: Booking Instance update existing Instances to get titles

parent 627ee2a1
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -138,3 +138,13 @@ function bookable_calendar_update_8110() {
  \Drupal::entityDefinitionUpdateManager()
    ->installFieldStorageDefinition('title', 'bookable_calendar_opening_inst', 'bookable_calendar_opening_inst', $field_storage_definition);
}

/**
 * Update all Opening Instances to give them titles.
 */
function bookable_calendar_update_8111() {
  $all_openings = \Drupal::entityTypeManager()->getStorage('bookable_calendar_opening_inst')->loadMultiple();
  foreach ($all_openings as $opening) {
    $opening->save();
  }
}