function InlineBlock::__construct

Same name and namespace in other branches
  1. 11.x core/modules/layout_builder/src/Plugin/Block/InlineBlock.php \Drupal\layout_builder\Plugin\Block\InlineBlock::__construct()
  2. 10 core/modules/layout_builder/src/Plugin/Block/InlineBlock.php \Drupal\layout_builder\Plugin\Block\InlineBlock::__construct()
  3. 9 core/modules/layout_builder/src/Plugin/Block/InlineBlock.php \Drupal\layout_builder\Plugin\Block\InlineBlock::__construct()
  4. 8.9.x core/modules/layout_builder/src/Plugin/Block/InlineBlock.php \Drupal\layout_builder\Plugin\Block\InlineBlock::__construct()

Constructs a new InlineBlock.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

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

\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entityDisplayRepository: The entity display repository.

\Drupal\Core\Session\AccountInterface $currentUser: The current user.

Overrides BlockPluginTrait::__construct

File

core/modules/layout_builder/src/Plugin/Block/InlineBlock.php, line 67

Class

InlineBlock
Defines an inline block plugin type.

Namespace

Drupal\layout_builder\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, protected EntityTypeManagerInterface $entityTypeManager, protected EntityDisplayRepositoryInterface $entityDisplayRepository, protected AccountInterface $currentUser) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  if (!empty($this->configuration['block_revision_id']) || !empty($this->configuration['block_serialized'])) {
    $this->isNew = FALSE;
  }
}

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