You are here

protected function DialogHelperTrait::dialogId in Layout Paragraphs 2.0.x

Generates a dialog id for a given layout.

Parameters

\Drupal\layout_paragraphs\LayoutParagraphsLayout $layout: The layout paragraphs object.

Return value

string The id.

5 calls to DialogHelperTrait::dialogId()
DialogHelperTrait::dialogSelector in src/DialogHelperTrait.php
Generates a dialog selector for a given layout.
DialogHelperTrait::dialogSettings in src/DialogHelperTrait.php
Returns an array of dialog settings for modal edit forms.
LayoutParagraphsBuilder::buildComponent in src/Element/LayoutParagraphsBuilder.php
Returns the build array for a single layout component.
LayoutParagraphsBuilder::dialogOptions in src/Element/LayoutParagraphsBuilder.php
Returns an array of dialog options.
LayoutParagraphsBuilder::insertComponentButton in src/Element/LayoutParagraphsBuilder.php
Returns the render array for a insert component button.

File

src/DialogHelperTrait.php, line 22

Class

DialogHelperTrait
Defines a dialog id helper trait.

Namespace

Drupal\layout_paragraphs

Code

protected function dialogId(LayoutParagraphsLayout $layout) {
  return Html::getId('lpb-dialog-' . $layout
    ->id());
}