public function FormatTextFilter::filter in Typed Data API enhancements 8
Filters the given data value.
Parameters
\Drupal\Core\TypedData\DataDefinitionInterface $definition: The definition of the filtered data.
mixed $value: The value for which to apply the filter.
array $arguments: The array of filter arguments.
\Drupal\Core\Render\BubbleableMetadata|null $bubbleable_metadata: (optional) An object to which required bubbleable metadata will be added.
Return value
mixed The resulting data value.
Overrides DataFilterInterface::filter
File
- src/
Plugin/ TypedDataFilter/ FormatTextFilter.php, line 62
Class
- FormatTextFilter
- A data filter which marks string data as sanitized.
Namespace
Drupal\typed_data\Plugin\TypedDataFilterCode
public function filter(DataDefinitionInterface $definition, $value, array $arguments, BubbleableMetadata $bubbleable_metadata = NULL) {
return check_markup($value, $arguments[0]);
}