You are here

public function InlineBlockEntityOperations::removeUnused in Drupal 9

Same name and namespace in other branches
  1. 8 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 216

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