From fcf8d8c7a08e1c69571965f83827a80eb88b8f7e Mon Sep 17 00:00:00 2001 From: Mike Decker Date: Wed, 29 Mar 2023 09:21:48 -0700 Subject: [PATCH] HSD8-1454 Disable eck/paragraph cleanup cron --- .../modules/humsci/hs_field_helpers/hs_field_helpers.module | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docroot/modules/humsci/hs_field_helpers/hs_field_helpers.module b/docroot/modules/humsci/hs_field_helpers/hs_field_helpers.module index 797a65bda1..45959670ec 100644 --- a/docroot/modules/humsci/hs_field_helpers/hs_field_helpers.module +++ b/docroot/modules/humsci/hs_field_helpers/hs_field_helpers.module @@ -29,6 +29,7 @@ use Drupal\hs_field_helpers\Plugin\Field\FieldWidget\HsViewfieldWidgetSelect; use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay; use Drupal\ui_patterns\Element\PatternContext; use Drupal\ui_patterns\UiPatterns; +use Drupal\Core\Site\Settings; /** * Implements hook_preprocess_HOOK(). @@ -553,6 +554,9 @@ function _hs_field_helpers_get_view_mode_component(FieldableEntityInterface $ent * Implements hook_cron(). */ function hs_field_helpers_cron() { + if (!Settings::get('hs_field_helpers_cron', FALSE)) { + return; + } $deleted = _he_field_helpers_clean_eck(); $logger = \Drupal::logger('hs_field_helpers'); foreach ($deleted as $entity_type => $ids) {