You are here

protected function Xls::formatValue in Excel Serialization 8

Formats a single value for a given XLS cell.

Parameters

string $value: The raw value to be formatted.

Return value

string The formatted value.

2 calls to Xls::formatValue()
Xls::setData in src/Encoder/Xls.php
Set sheet data.
Xls::setHeaders in src/Encoder/Xls.php
Set sheet headers.

File

src/Encoder/Xls.php, line 278

Class

Xls
Adds XLS encoder support for the Serialization API.

Namespace

Drupal\xls_serialization\Encoder

Code

protected function formatValue($value) {

  // @todo Make these filters configurable.
  $value = Html::decodeEntities($value);
  $value = strip_tags($value);
  $value = trim($value);
  return $value;
}