Provides a test filter to replace all content.
@Filter(
id = "filter_test_replace",
module = "filter_test",
title = @Translation("Testing filter"),
description = @Translation("Replaces all content with filter and text format information."),
type = FILTER_TYPE_TRANSFORM_IRREVERSIBLE
)
Expanded class hierarchy of FilterTestReplace
class FilterTestReplace extends FilterBase {
/**
* {@inheritdoc}
*/
public function process($text, $langcode, $cache, $cache_id) {
$text = array();
$text[] = 'Filter: ' . $this
->getLabel() . ' (' . $this
->getPluginId() . ')';
$text[] = 'Language: ' . $langcode;
$text[] = 'Cache: ' . ($cache ? 'Enabled' : 'Disabled');
if ($cache_id) {
$text[] = 'Cache ID: ' . $cache_id;
}
return implode("<br />\n", $text);
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FilterBase:: |
protected | property | A collection of all filters this filter participates in. | |
FilterBase:: |
public | property | A Boolean indicating whether the text processed by this filter may be cached. | |
FilterBase:: |
public | property | The name of the module that owns this filter. | |
FilterBase:: |
protected | property | The plugin ID of this filter. | |
FilterBase:: |
public | property | An associative array containing the configured settings of this filter. | |
FilterBase:: |
public | property | A Boolean indicating whether this filter is enabled. | |
FilterBase:: |
public | property | The weight of this filter compared to others in a filter collection. | |
FilterBase:: |
public | function |
Exports the complete configuration of this filter plugin instance. Overrides FilterInterface:: |
|
FilterBase:: |
public | function |
Returns the administrative description for this filter plugin. Overrides FilterInterface:: |
|
FilterBase:: |
public | function |
Returns the administrative label for this filter plugin. Overrides FilterInterface:: |
|
FilterBase:: |
public | function |
Returns the processing type of this filter plugin. Overrides FilterInterface:: |
|
FilterBase:: |
public | function |
Prepares the text for processing. Overrides FilterInterface:: |
|
FilterBase:: |
public | function |
Sets the configuration for this filter plugin instance. Overrides FilterInterface:: |
|
FilterBase:: |
public | function |
Generates a filter's settings form. Overrides FilterInterface:: |
2 |
FilterBase:: |
public | function |
Generates a filter's tip. Overrides FilterInterface:: |
6 |
FilterBase:: |
public | function |
Constructs a Drupal\Component\Plugin\PluginBase object. Overrides PluginBase:: |
|
FilterTestReplace:: |
public | function |
Performs the filter processing. Overrides FilterInterface:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
public | function |
Returns the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function |
Returns the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |