You are here

public function InlineBlockEntityOperations::removeUnused in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/layout_builder/src/InlineBlockEntityOperations.php \Drupal\layout_builder\InlineBlockEntityOperations::removeUnused()

Removes unused inline blocks.

Parameters

int $limit: The maximum number of inline blocks to remove.

File

core/modules/layout_builder/src/InlineBlockEntityOperations.php, line 238

Class

InlineBlockEntityOperations
Defines a class for reacting to entity events related to Inline Blocks.

Namespace

Drupal\layout_builder

Code

public function removeUnused($limit = 100) {
  $this
    ->deleteBlocksAndUsage($this->usage
    ->getUnused($limit));
}