You are here

protected function D7Webform::buildItemsString in Webform: Migrate 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/migrate/source/d7/D7Webform.php \Drupal\webform_migrate\Plugin\migrate\source\d7\D7Webform::buildItemsString()
1 call to D7Webform::buildItemsString()
D7Webform::buildFormElements in src/Plugin/migrate/source/d7/D7Webform.php
Build form elements from webform component table.

File

src/Plugin/migrate/source/d7/D7Webform.php, line 976

Class

D7Webform
Drupal 7 webform source from database.

Namespace

Drupal\webform_migrate\Plugin\migrate\source\d7

Code

protected function buildItemsString($itemsArray, $baseIndent = '') {
  $preparedItems = array_map(function ($item) use ($baseIndent) {
    return $baseIndent . '  ' . $this
      ->encapsulateString($item[0]) . ': ' . $this
      ->encapsulateString($item[1]);
  }, $itemsArray);
  return implode("\n", $preparedItems);
}