Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LayoutBuilderHighlightTrait.php

function LayoutBuilderHighlightTrait::blockAddHighlightId

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

Parameters

string $delta: The section the block is in.

string $region: The section region in which the block is placed.

Return value

string The highlight ID of the block.

4 calls to LayoutBuilderHighlightTrait::blockAddHighlightId()
AddBlockForm::buildForm in core/modules/layout_builder/src/Form/AddBlockForm.php
Builds the form for the block.
ChooseBlockController::build in core/modules/layout_builder/src/Controller/ChooseBlockController.php
Provides the UI for choosing a new block.
ChooseBlockController::inlineBlockList in core/modules/layout_builder/src/Controller/ChooseBlockController.php
Provides the UI for choosing a new inline block.
LayoutBuilder::buildAdministrativeSection in core/modules/layout_builder/src/Element/LayoutBuilder.php
Builds the render array for the layout section while editing.

File

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

Class

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

Namespace

Drupal\layout_builder

Code

protected function blockAddHighlightId($delta, $region) {
    return "block-{$delta}-{$region}";
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal