public function Formatter::drupal_text_format in Forena Reports 8
Parameters
string $value:
string $format_string:
\Drupal\forena\Token\ReportReplacer $teng: Replacer object to use in token replacement.
Return value
\Drupal\Component\Render\MarkupInterface
File
- src/
FrxPlugin/ FieldFormatter/ Formatter.php, line 84 - contains various methods for extending report formating, layout, transformation and design.
Class
- Formatter
- Formatter for common drupal fields.
Namespace
Drupal\forena\FrxPlugin\FieldFormatterCode
public function drupal_text_format($value, $format_string, $teng) {
$field = '';
if ($format_string) {
$field = $format_string;
}
$field = $teng
->replace($field, TRUE);
if ($field) {
$format = $field;
}
else {
$format = filter_default_format();
}
return check_markup(html_entity_decode($value, ENT_QUOTES, 'UTF-8'), $format);
}