function FilterBase::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.

Overrides FilterInterface::prepare

File

core/modules/filter/src/Plugin/FilterBase.php, line 139

Class

FilterBase
Provides a base class for Filter plugins.

Namespace

Drupal\filter\Plugin

Code

public function prepare($text, $langcode) {
  return $text;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.