You are here

public function InlineBlockEntityOperations::__construct in Drupal 9

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

Constructs a new EntityOperations object.

@todo This constructor has one optional parameter, $section_storage_manager and one totally unused $database parameter. Deprecate the current constructor signature in https://www.drupal.org/node/3031492 after the general policy for constructor backwards compatibility is determined in https://www.drupal.org/node/3030640.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager service.

\Drupal\layout_builder\InlineBlockUsageInterface $usage: Inline block usage tracking service.

\Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface $section_storage_manager: (optional) The section storage manager.

File

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

Class

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

Namespace

Drupal\layout_builder

Code

public function __construct(EntityTypeManagerInterface $entityTypeManager, InlineBlockUsageInterface $usage, SectionStorageManagerInterface $section_storage_manager) {
  $this->entityTypeManager = $entityTypeManager;
  $this->blockContentStorage = $entityTypeManager
    ->getStorage('block_content');
  $this->usage = $usage;
  $this->sectionStorageManager = $section_storage_manager;
}