function InlineBlockEntityOperations::removeUnused

Same name in other branches
  1. 9 core/modules/layout_builder/src/InlineBlockEntityOperations.php \Drupal\layout_builder\InlineBlockEntityOperations::removeUnused()
  2. 8.9.x core/modules/layout_builder/src/InlineBlockEntityOperations.php \Drupal\layout_builder\InlineBlockEntityOperations::removeUnused()
  3. 11.x 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 194

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

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