trait LayoutBuilderHighlightTrait (View source)

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

Methods

string
blockAddHighlightId(string $delta, string $region)

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

string
blockUpdateHighlightId(string $uuid)

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

string
sectionAddHighlightId(string $delta)

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

string
sectionUpdateHighlightId(string $delta)

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

Details

protected string blockAddHighlightId(string $delta, string $region)

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.

protected string blockUpdateHighlightId(string $uuid)

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

Parameters

string $uuid

The uuid of the block.

Return Value

string

The highlight ID of the block.

protected string sectionAddHighlightId(string $delta)

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.

protected string sectionUpdateHighlightId(string $delta)

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.