You are here

protected function LayoutBuilderHighlightTrait::sectionAddHighlightId in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/LayoutBuilderHighlightTrait.php \Drupal\layout_builder\LayoutBuilderHighlightTrait::sectionAddHighlightId()
  2. 9 core/modules/layout_builder/src/LayoutBuilderHighlightTrait.php \Drupal\layout_builder\LayoutBuilderHighlightTrait::sectionAddHighlightId()

Provides the ID used to highlight the active Layout Builder UI element.

Parameters

string $delta: The location of the section.

Return value

string The highlight ID of the section.

3 calls to LayoutBuilderHighlightTrait::sectionAddHighlightId()
ChooseSectionController::build in core/modules/layout_builder/src/Controller/ChooseSectionController.php
Choose a layout plugin to add as a section.
ConfigureSectionForm::buildForm in core/modules/layout_builder/src/Form/ConfigureSectionForm.php
Form constructor.
LayoutBuilder::buildAddSectionLink in core/modules/layout_builder/src/Element/LayoutBuilder.php
Builds a link to add a new section at a given delta.

File

core/modules/layout_builder/src/LayoutBuilderHighlightTrait.php, line 47

Class

LayoutBuilderHighlightTrait
A trait for generating IDs used to highlight active UI elements.

Namespace

Drupal\layout_builder

Code

protected function sectionAddHighlightId($delta) {
  return "section-{$delta}";
}