function FilterTestCacheTags::process
Same name in other branches
- 9 core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestCacheTags.php \Drupal\filter_test\Plugin\Filter\FilterTestCacheTags::process()
- 8.9.x core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestCacheTags.php \Drupal\filter_test\Plugin\Filter\FilterTestCacheTags::process()
- 11.x core/modules/filter/tests/filter_test/src/Plugin/Filter/FilterTestCacheTags.php \Drupal\filter_test\Plugin\Filter\FilterTestCacheTags::process()
Overrides FilterInterface::process
File
-
core/
modules/ filter/ tests/ filter_test/ src/ Plugin/ Filter/ FilterTestCacheTags.php, line 25
Class
- FilterTestCacheTags
- Provides a test filter to associate cache tags.
Namespace
Drupal\filter_test\Plugin\FilterCode
public function process($text, $langcode) {
$result = new FilterProcessResult($text);
$result->addCacheTags([
'foo:bar',
]);
$result->addCacheTags([
'foo:baz',
]);
return $result;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.