public 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.

bool $cache: A Boolean indicating whether the filtered text is going to be cached in {cache_filter}.

string $cache_id: The ID of the filtered text in {cache_filter}, if $cache is TRUE.

Return value

string The prepared, escaped text.

Overrides FilterInterface::prepare

File

drupal/core/modules/filter/lib/Drupal/filter/Plugin/FilterBase.php, line 146
Contains \Drupal\filter\Plugin\Filter\FilterBase.

Class

FilterBase
Provides a base class for Filter plugins.

Namespace

Drupal\filter\Plugin

Code

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