function layout_builder_cron

Same name and namespace in other branches
  1. 9 core/modules/layout_builder/layout_builder.module \layout_builder_cron()
  2. 8.9.x core/modules/layout_builder/layout_builder.module \layout_builder_cron()
  3. 10 core/modules/layout_builder/layout_builder.module \layout_builder_cron()

Implements hook_cron().

File

core/modules/layout_builder/layout_builder.module, line 217

Code

function layout_builder_cron() {
    if (\Drupal::moduleHandler()->moduleExists('block_content')) {
        
        /** @var \Drupal\layout_builder\InlineBlockEntityOperations $entity_operations */
        $entity_operations = \Drupal::classResolver(InlineBlockEntityOperations::class);
        $entity_operations->removeUnused();
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.