You are here

public function InlineBlockEntityOperations::removeUnused in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/InlineBlockEntityOperations.php \Drupal\layout_builder\InlineBlockEntityOperations::removeUnused()
  2. 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 210

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));
}