function SectionComponent::getPluginId

Same name in other branches
  1. 8.9.x core/modules/layout_builder/src/SectionComponent.php \Drupal\layout_builder\SectionComponent::getPluginId()
  2. 10 core/modules/layout_builder/src/SectionComponent.php \Drupal\layout_builder\SectionComponent::getPluginId()
  3. 11.x 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'];
}

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