You are here

public static function WebformYaml::decode in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Utility/WebformYaml.php \Drupal\webform\Utility\WebformYaml::decode()

Decodes data from the serialization format.

Parameters

string $raw: The raw data string to decode.

Return value

mixed The decoded data.

Throws

\Drupal\Component\Serialization\Exception\InvalidDataTypeException

Overrides SerializationInterface::decode

15 calls to WebformYaml::decode()
Webform::getElementsOriginalDecoded in src/Entity/Webform.php
Get original elements decoded as an associative array.
Webform::initElements in src/Entity/Webform.php
Initialize and parse webform elements.
Webform::initElementsTranslation in src/Entity/Webform.php
Initialize elements translation.
WebformBlock::build in src/Plugin/Block/WebformBlock.php
Builds and returns the renderable array for this block plugin.
WebformEntityElementsForm::getElementsWithoutWebformTypePrefix in src/WebformEntityElementsForm.php
Get elements without 'webform_' #type prefix.

... See full list

File

src/Utility/WebformYaml.php, line 42

Class

WebformYaml
Provides YAML tidy function.

Namespace

Drupal\webform\Utility

Code

public static function decode($raw) {
  return $raw ? Yaml::decode($raw) : [];
}