From 702c8133355c37c23d485ceb6cfed01f3bcecc39 Mon Sep 17 00:00:00 2001 From: Christian Burk Date: Thu, 19 Oct 2023 06:23:08 -0500 Subject: [PATCH] VACMS-15422: Removes install file. We need to the config first. --- .../va_gov_vet_center.install | 38 ------------------- 1 file changed, 38 deletions(-) delete mode 100644 docroot/modules/custom/va_gov_vet_center/va_gov_vet_center.install diff --git a/docroot/modules/custom/va_gov_vet_center/va_gov_vet_center.install b/docroot/modules/custom/va_gov_vet_center/va_gov_vet_center.install deleted file mode 100644 index 0e415e5085..0000000000 --- a/docroot/modules/custom/va_gov_vet_center/va_gov_vet_center.install +++ /dev/null @@ -1,38 +0,0 @@ -getStorage('node'); - $vet_center_outstations = $storage_handler->loadByProperties(['type' => 'vet_center_outstation']); - $updated = 0; - foreach ($vet_center_outstations as $vet_center_outstation) { - $original_name = $vet_center_outstation->getTitle(); - $vet_center_outstation->field_official_name->value = $original_name; - $vet_center_outstation->setNewRevision(TRUE); - // New revision will inherit content moderation status from default rev. - $vet_center_outstation->isDefaultRevision(TRUE); - $vet_center_outstation->setRevisionLogMessage('VACMS Facilities Team: Copied "Common name" field to "Vet Center - Outstation" name field.'); - $vet_center_outstation->setRevisionCreationTime(Drupal::time()->getRequestTime()); - $vet_center_outstation->setChangedTime(Drupal::time()->getRequestTime()); - // Set revision author to uid 1317 (CMS Migrator user). - $vet_center_outstation->setRevisionUserId(1317); - $saved = $vet_center_outstation->save(); - $updated = (is_int($saved) && $saved > 0) ? $updated + 1 : $updated; - } - - $log_level = ($updated === count($vet_center_outstations)) ? LogLevel::INFO : LogLevel::ERROR; - - Drupal::logger('va_gov_vet_center')->log($log_level, 'Vet Center - Outstation update: Successfully updated %ct_updated out of %ct_count Vet Center - Outstations.', [ - '%ct_count' => count($vet_center_outstations), - '%ct_updated' => $updated, - ]); -}