public function RemoveHtmlComments::getFilters in Twig - Remove HTML comments 8
Generates a list of all Twig filters that this extension defines.
Return value
array The Twig filters of this extension.
File
- src/
TwigExtension/ RemoveHtmlComments.php, line 23
Class
- RemoveHtmlComments
- Provides a Twig filter that removes HTML comments from input.
Namespace
Drupal\twig_remove_html_comments\TwigExtensionCode
public function getFilters() : array {
return [
new TwigFilter('remove_html_comments', [
$this,
'removeHtmlCommentsAsRenderArray',
]),
new TwigFilter('remove_html_comments_as_string', [
$this,
'removeHtmlCommentsFromString',
]),
];
}