function FilterInterface::prepare
Same name in other branches
- 9 core/modules/filter/src/Plugin/FilterInterface.php \Drupal\filter\Plugin\FilterInterface::prepare()
- 8.9.x core/modules/filter/src/Plugin/FilterInterface.php \Drupal\filter\Plugin\FilterInterface::prepare()
- 10 core/modules/filter/src/Plugin/FilterInterface.php \Drupal\filter\Plugin\FilterInterface::prepare()
Prepares the text for processing.
Filters should not use the prepare method for anything other than escaping, because that would short-circuit the control the user has over the order in which filters are applied.
Parameters
string $text: The text string to be filtered.
string $langcode: The language code of the text to be filtered.
Return value
string The prepared, escaped text.
1 method overrides FilterInterface::prepare()
- FilterBase::prepare in core/
modules/ filter/ src/ Plugin/ FilterBase.php - Prepares the text for processing.
File
-
core/
modules/ filter/ src/ Plugin/ FilterInterface.php, line 156
Class
- FilterInterface
- Defines the interface for text processing filter plugins.
Namespace
Drupal\filter\PluginCode
public function prepare($text, $langcode);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.