You are here

public function YamlFormElementBase::buildExportRecord in YAML Form 8

Build an element's export row.

Parameters

array $element: An element.

array $export_options: An associative array of export options.

Return value

array An array containing the element's export row.

Overrides YamlFormElementInterface::buildExportRecord

See also

\Drupal\yamlform\YamlFormSubmissionExporterInterface::getDefaultExportOptions

5 methods override YamlFormElementBase::buildExportRecord()
DateBase::buildExportRecord in src/Plugin/YamlFormElement/DateBase.php
Build an element's export row.
OptionsBase::buildExportRecord in src/Plugin/YamlFormElement/OptionsBase.php
Build an element's export row.
YamlFormCompositeBase::buildExportRecord in src/Plugin/YamlFormElement/YamlFormCompositeBase.php
Build an element's export row.
YamlFormLikert::buildExportRecord in src/Plugin/YamlFormElement/YamlFormLikert.php
Build an element's export row.
YamlFormSignature::buildExportRecord in src/Plugin/YamlFormElement/YamlFormSignature.php
Build an element's export row.

File

src/YamlFormElementBase.php, line 775

Class

YamlFormElementBase
Provides a base class for a form element.

Namespace

Drupal\yamlform

Code

public function buildExportRecord(array $element, $value, array $export_options) {
  $element['#format'] = 'raw';
  return [
    $this
      ->formatText($element, $value, $export_options),
  ];
}