Skip to content
Snippets Groups Projects

Add messages to update hooks

1 file
+ 5
5
Compare changes
  • Side-by-side
  • Inline
+ 5
5
@@ -29,7 +29,7 @@ function group_update_10300(&$sandbox) {
// Short-circuit the following updates if we are already on version 3.
if (empty($group_content_type_configs)) {
$state->set('group_update_10300_detected_legacy_version', FALSE);
return;
return t('Module was already on v3, skipping upgrade path.');
}
$state->set('group_update_10300_detected_legacy_version', TRUE);
@@ -227,7 +227,7 @@ function group_update_10300(&$sandbox) {
function group_update_10301(&$sandbox) {
// Short-circuit the update if we are already on version 3.
if (!\Drupal::state()->get('group_update_10300_detected_legacy_version', FALSE)) {
return;
return t('Module was already on v3, skipping upgrade path.');
}
$definition_update_manager = \Drupal::entityDefinitionUpdateManager();
@@ -245,7 +245,7 @@ function group_update_10301(&$sandbox) {
function group_update_10302(&$sandbox) {
// Short-circuit the update if we are already on version 3.
if (!\Drupal::state()->get('group_update_10300_detected_legacy_version', FALSE)) {
return;
return t('Module was already on v3, skipping upgrade path.');
}
$config_factory = \Drupal::configFactory();
@@ -318,7 +318,7 @@ function group_update_10304(&$sandbox) {
// Previous updates ran with new state entry, do nothing.
if (!is_null($state->get('group_update_10300_detected_legacy_version'))) {
return;
return t('State key was properly set before, skipping update.');
}
// Previous updates ran with old state entry, convert to new state entry.
@@ -333,7 +333,7 @@ function group_update_10304(&$sandbox) {
function group_update_10305(&$sandbox) {
// Short-circuit the update if we are already on version 3.
if (!\Drupal::state()->get('group_update_10300_detected_legacy_version', FALSE)) {
return;
return t('Module was already on v3, skipping upgrade path.');
}
$definition_update_manager = \Drupal::entityDefinitionUpdateManager();
Loading