You are here

protected function WebformEntityElementsForm::getElementsWithoutWebformTypePrefix in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/WebformEntityElementsForm.php \Drupal\webform\WebformEntityElementsForm::getElementsWithoutWebformTypePrefix()

Get elements without 'webform_' #type prefix.

Return value

string Elements (YAML) without 'webform_' #type prefix.

1 call to WebformEntityElementsForm::getElementsWithoutWebformTypePrefix()
WebformEntityElementsForm::form in src/WebformEntityElementsForm.php
Gets the actual form array to be built.

File

src/WebformEntityElementsForm.php, line 173

Class

WebformEntityElementsForm
Webform manage elements YAML source form.

Namespace

Drupal\webform

Code

protected function getElementsWithoutWebformTypePrefix($value) {
  $elements = WebformYaml::decode($value);
  if (!is_array($elements)) {
    return $value;
  }
  $this
    ->removeWebformTypePrefixRecursive($elements);
  return WebformYaml::encode($elements);
}