You are here

public static function ParagraphsFeatures::getWrapperId in Paragraphs Features 2.x

Same name and namespace in other branches
  1. 8 src/ParagraphsFeatures.php \Drupal\paragraphs_features\ParagraphsFeatures::getWrapperId()

Getting paragraphs widget wrapper ID.

Logic is copied from paragraphs module.

Parameters

array $parents: List of parents for widget.

string $field_name: Widget field name.

Return value

string Returns widget wrapper ID.

1 call to ParagraphsFeatures::getWrapperId()
paragraphs_features_field_widget_multivalue_form_alter in ./paragraphs_features.module
Implements hook_field_widget_multivalue_form_alter().

File

src/ParagraphsFeatures.php, line 44

Class

ParagraphsFeatures
Paragraphs features class.

Namespace

Drupal\paragraphs_features

Code

public static function getWrapperId(array $parents, $field_name) {
  return Html::getId(implode('-', array_merge($parents, [
    $field_name,
  ])) . '-add-more-wrapper');
}