Skip to content

Commit

Permalink
HSD8-1454 Disable eck/paragraph cleanup cron
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Mar 29, 2023
1 parent b4c2559 commit fcf8d8c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit fcf8d8c

Please sign in to comment.