You are here

public function SectionComponent::getPluginId in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/layout_builder/src/SectionComponent.php \Drupal\layout_builder\SectionComponent::getPluginId()

Gets the plugin ID.

Return value

string The plugin ID.

Throws

\Drupal\Component\Plugin\Exception\PluginException Thrown if the plugin ID cannot be found.

1 call to SectionComponent::getPluginId()
SectionComponent::getPlugin in core/modules/layout_builder/src/SectionComponent.php
Gets the plugin for this component.

File

core/modules/layout_builder/src/SectionComponent.php, line 216

Class

SectionComponent
Provides a value object for a section component.

Namespace

Drupal\layout_builder

Code

public function getPluginId() {
  if (empty($this->configuration['id'])) {
    throw new PluginException(sprintf('No plugin ID specified for component with "%s" UUID', $this->uuid));
  }
  return $this->configuration['id'];
}